summaryrefslogtreecommitdiffstats
path: root/src/init.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-11-13 07:05:34 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-11-13 07:05:34 -0500
commitcebb17f85536815daf55fd8196791ee719ba6ba0 (patch)
tree5891e2075339fd4886867d711591202da6cb559c /src/init.c
parent7afd68829c049cb61e4610836bda8adcf1f7ccee (diff)
everything
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/init.c b/src/init.c
index e2145b4..3ffa429 100644
--- a/src/init.c
+++ b/src/init.c
@@ -4,13 +4,38 @@ Gyro gyro;
unsigned int imeCount;
void initializeIO(){
- pinMode(ANALOG_PORT(1),INPUT_ANALOG);
+ pinMode(ANALOG_PORT(1),INPUT_ANALOG); // Power expander status port
+ pinMode(1,OUTPUT); // LED
}
void initialize(){
- imeCount = imeInitializeAll();
- gyro=gyroInit(2,0);
+
+ // Initialize the LCDs.
+
lcdInit(uart1);
lcdClear(uart1);
lcdSetBacklight(uart1,1);
+
+ lcdInit(uart2);
+ lcdClear(uart2);
+ lcdSetBacklight(uart2,1);
+
+ // Setup sensors.
+
+ imeCount = imeInitializeAll();
+ gyro=gyroInit(2,0);
+
+ lcdPrint(uart1,1,"%u IMEs :)",imeCount);
+
+ lcdPrint(uart2,1,"ERR: Dark theme ");
+ lcdPrint(uart2,2," not found! ");
+
+ delay(2000);
+
+ lcdPrint(uart1,1,"ready...");
+ lcdPrint(uart2,1,"...yeah. ");
+ lcdPrint(uart2,2," ");
+
+ delay(1000);
+
}