reads gyroscope values

Dependencies:   L3GD20 mbed

Files at this revision

API Documentation at this revision

Comitter:
mitchelljones
Date:
Fri Sep 18 16:08:39 2015 +0000
Commit message:
revision 1

Changed in this revision

L3GD20.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
diff -r 000000000000 -r 637603e82d47 L3GD20.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/L3GD20.lib	Fri Sep 18 16:08:39 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/bclaus/code/L3GD20/#62dfce144cf7
diff -r 000000000000 -r 637603e82d47 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 18 16:08:39 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "L3GD20.h"
+ 
+Serial pc(USBTX, USBRX);
+L3GD20 gyro(p28, p27);
+float gx;
+float gy;
+float gz;
+int x;
+ 
+int main()
+{
+  
+    while(1) {
+      gyro.read(&gx,&gy,&gz);
+      x = (int)gx*1000;
+      pc.printf("%d",x);
+    
+        wait(0.01);
+       
+ 
+    }
+ 
+}
\ No newline at end of file
diff -r 000000000000 -r 637603e82d47 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Sep 18 16:08:39 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file