Asdf

Dependencies:   mbed ITG3200

Committer:
brunostgr
Date:
Tue Dec 17 17:50:53 2019 +0000
Revision:
0:7b5068632811
Asdf

Who changed what in which revision?

UserRevisionLine numberNew contents of line
brunostgr 0:7b5068632811 1 #include "mbed.h"
brunostgr 0:7b5068632811 2 #include "ITG3200.h"
brunostgr 0:7b5068632811 3
brunostgr 0:7b5068632811 4 ITG3200 Gyro(p9, p10, 0xD0, 0xD1);
brunostgr 0:7b5068632811 5 Serial PC(USBTX,USBRX);
brunostgr 0:7b5068632811 6
brunostgr 0:7b5068632811 7 int main() {
brunostgr 0:7b5068632811 8
brunostgr 0:7b5068632811 9 int X,Y,Z,T;
brunostgr 0:7b5068632811 10 Gyro.Init();
brunostgr 0:7b5068632811 11 PC.printf("Starting system\n\r");
brunostgr 0:7b5068632811 12
brunostgr 0:7b5068632811 13 while(1) {
brunostgr 0:7b5068632811 14
brunostgr 0:7b5068632811 15 X = Gyro.GetX();
brunostgr 0:7b5068632811 16 Y = Gyro.GetY();
brunostgr 0:7b5068632811 17 Z = Gyro.GetZ();
brunostgr 0:7b5068632811 18 T = Gyro.GetTemp();
brunostgr 0:7b5068632811 19 PC.printf("Roll: %i | Pitch: %i | Yaw: %i | Temp: %i\n\r",X,Y,Z,T);
brunostgr 0:7b5068632811 20 wait(0.5);
brunostgr 0:7b5068632811 21 }
brunostgr 0:7b5068632811 22 }