Hello Word for the LG1300L IMU

Dependencies:   LG1300L_IMU TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
mjenkins11
Date:
Tue Mar 05 01:24:11 2013 +0000
Child:
1:99171a0e8301
Commit message:
revision 0.1

Changed in this revision

LG1300L.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
i2c.bld 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/LG1300L.lib	Tue Mar 05 01:24:11 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mjenkins11/code/LG1300L_IMU/#c40e8dead9be
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Mar 05 01:24:11 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/i2c.bld	Tue Mar 05 01:24:11 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/82220227f4fa
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 05 01:24:11 2013 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "LG1300L.h"
+
+TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+I2C i2c(p28,p27);
+DigitalOut LED (LED1);
+
+int main() {
+    LG1300L IMU(i2c, 2);
+
+    while(1) {
+        float angle = IMU.GetAngle();
+        float ROT= IMU.GetROT();
+        float X_ACC = IMU.GetACC_X();
+        float Y_ACC = IMU. GetACC_Y();
+        float Z_ACC = IMU. GetACC_Z();
+        pc.printf("///////////////////////////////////\n");
+        pc.printf("//ANGLE: %f\n", angle);
+        pc.printf("//ROT: %f\n", ROT);
+        pc.printf("//X-Axis: %f\n", X_ACC );
+        pc.printf("//Y-Axis: %f\n", Y_ACC );
+        pc.printf("//Z-axis: %f\n", Z_ACC );
+        pc.printf("///////////////////////////////////\n");
+        wait(1);
+    }
+}
+    
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 05 01:24:11 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/3d0ef94e36ec
\ No newline at end of file