Demo Program
Dependencies: LG1300L_IMU TextLCD mbed
Fork of LG1300L_Hello_World by
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 #include "LG1300L.h" 00004 00005 TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 00006 00007 I2C i2c(p28,p27); 00008 00009 int main() { 00010 LG1300L IMU(i2c, 2); 00011 00012 while(1) { 00013 float angle = IMU.GetAngle(); 00014 float X_ACC = IMU.GetACC_X(); 00015 pc.printf("//ANGLE: %f\n", angle); 00016 pc.printf("//X-Axis: %f\n", X_ACC ); 00017 00018 wait(1); 00019 } 00020 } 00021
Generated on Fri Jul 29 2022 10:25:54 by 1.7.2