Demo Program

Dependencies:   LG1300L_IMU TextLCD mbed

Fork of LG1300L_Hello_World by Michael Jenkins

main.cpp

Committer:
mjenkins11
Date:
2013-03-05
Revision:
3:76f54137da35
Parent:
1:99171a0e8301

File content as of revision 3:76f54137da35:

#include "mbed.h"
#include "TextLCD.h"
#include "LG1300L.h"

TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7

I2C i2c(p28,p27);

int main() {
    LG1300L IMU(i2c, 2);

    while(1) {
        float angle = IMU.GetAngle();
        float X_ACC = IMU.GetACC_X();
        pc.printf("//ANGLE: %f\n", angle);
        pc.printf("//X-Axis: %f\n", X_ACC );

        wait(1);
    }
}