summaryrefslogtreecommitdiff
path: root/gyro.ino
diff options
context:
space:
mode:
Diffstat (limited to 'gyro.ino')
-rw-r--r--gyro.ino28
1 files changed, 28 insertions, 0 deletions
diff --git a/gyro.ino b/gyro.ino
new file mode 100644
index 0000000..9037799
--- /dev/null
+++ b/gyro.ino
@@ -0,0 +1,28 @@
+#include "gyroscope.hpp"
+
+void setup()
+{
+ Serial.begin(9600);
+
+ Serial.println("Hej!");
+
+ auto gyroscope_id = Gyroscope::initialize();
+
+ if (gyroscope_id == -1)
+ {
+ Serial.println("Failed to communicate with gyrosensor!");
+ exit(1);
+ }
+
+ Gyroscope gyroscope(gyroscope_id);
+}
+
+void loop()
+{
+ //auto gyroscope_data = read();
+
+ //char *out;
+ //sprintf(out, "X: %d Y: %d Z: %d", gyroscope_data.x, gyroscope_data.y, gyroscope_data.z);
+
+ // Serial.println("hej!");
+} \ No newline at end of file