Demo Program

Dependencies:   LG1300L_IMU TextLCD mbed

Fork of LG1300L_Hello_World by Michael Jenkins

Files at this revision

API Documentation at this revision

Comitter:
mjenkins11
Date:
Tue Mar 05 05:11:48 2013 +0000
Parent:
2:3244a6d671cc
Commit message:
Final;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 05 05:07:38 2013 +0000
+++ b/main.cpp	Tue Mar 05 05:11:48 2013 +0000
@@ -1,27 +1,20 @@
 #include "mbed.h"
+#include "TextLCD.h"
 #include "LG1300L.h"
 
-Serial pc(USBTX, USBRX); // tx, rx
+TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
 
 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);
     }
 }