Programmation
/
Lab6_Gyro
Asdf
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "ITG3200.h" 00003 00004 ITG3200 Gyro(p9, p10, 0xD0, 0xD1); 00005 Serial PC(USBTX,USBRX); 00006 00007 int main() { 00008 00009 int X,Y,Z,T; 00010 Gyro.Init(); 00011 PC.printf("Starting system\n\r"); 00012 00013 while(1) { 00014 00015 X = Gyro.GetX(); 00016 Y = Gyro.GetY(); 00017 Z = Gyro.GetZ(); 00018 T = Gyro.GetTemp(); 00019 PC.printf("Roll: %i | Pitch: %i | Yaw: %i | Temp: %i\n\r",X,Y,Z,T); 00020 wait(0.5); 00021 } 00022 }
Generated on Wed Jul 13 2022 00:30:00 by 1.7.2