#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetLCDBack.h>
#include <SetLCDString.h>
#include <GetExtGSensor.h>
#include <SetLCD3Char.h>
#include <SetTenthS.h>

int main(void)
{
    X2RCU_Init();
    int x = 0;
    int y = 0;
    int z = 0;
    SetLCDBack(1);
    SetLCDString(8, 0, "Gravity Sensor Test:", YELLOW, BLACK);
    SetLCDString(8, 16, "X : ", YELLOW, BLACK);
    SetLCDString(8, 32, "Y : ", YELLOW, BLACK);
    SetLCDString(8, 48, "Z : ", YELLOW, BLACK);
    while (1)
    {
        x = GetExtGSensor(_EXTGSENSOR_1_, 1);
        SetLCD3Char(64, 16, x, YELLOW, BLACK);
        y = GetExtGSensor(_EXTGSENSOR_1_, 2);
        SetLCD3Char(64, 32, y, YELLOW, BLACK);
        z = GetExtGSensor(_EXTGSENSOR_1_, 3);
        SetLCD3Char(64, 48, z, YELLOW, BLACK);
        SetTenthS(1);
    }
    return 1;
}

