Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ITG3200_HelloWorld by
main.cpp
00001 00002 #include "mbed.h" 00003 #include "ITG3200.h" 00004 00005 ITG3200 gyro(D14, D15, 0x68); 00006 00007 int main(void) 00008 { 00009 int x = 0, y = 0, z = 0, temp = 0; 00010 //Set highest bandwidth. 00011 gyro.setLpBandwidth(LPFBW_42HZ); 00012 00013 while (1) { 00014 wait(0.1f); 00015 x = gyro.getGyroX(); 00016 y = gyro.getGyroY(); 00017 z = gyro.getGyroZ(); 00018 temp = gyro.getTemperature(); 00019 printf("Temp: %d, X: %d, Y: %d, Z: %d\n", temp, x, y, z); 00020 } 00021 00022 }
Generated on Fri Jul 15 2022 17:45:16 by
1.7.2

Grove 3-Axis Digital Gyro