blob: 903779977979a3225b169a686a0df57d657bf4be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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!");
}
|