Example for ITG3200 gyro

Dependencies:   ITG3200 mbed

Fork of ITG3200_HelloWorld by Aaron Berk

Files at this revision

API Documentation at this revision

Comitter:
aberk
Date:
Tue Aug 03 13:10:51 2010 +0000
Child:
1:6a040ee9e40b
Commit message:
Version 1.0

Changed in this revision

ITG3200_lib.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ITG3200_lib.lib	Tue Aug 03 13:10:51 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/aberk/programs/ITG3200_lib/latest
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Aug 03 13:10:51 2010 +0000
@@ -0,0 +1,22 @@
+#include "ITG3200.h"
+
+Serial pc(USBTX, USBRX);
+ITG3200 gyro(p9, p10);
+
+int main() {
+
+    pc.printf("Now starting ITG-3200 test...\n");
+    
+    //Set highest bandwidth.
+    gyro.setLpBandwidth(LPFBW_256HZ);
+
+    while (1) {
+
+        //Arbitrary wait for printf clarity.
+        wait(0.1);
+        pc.printf("%f, %f, %f\n", gyro.getGyroX(),
+                  gyro.getGyroY(), gyro.getGyroZ());
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Aug 03 13:10:51 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da