1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <main.h>
Gyro gyro;
unsigned int imeCount;
void initializeIO(){
pinMode(ANALOG_PORT(1),INPUT_ANALOG); // Power expander status port
pinMode(1,OUTPUT); // LED
}
void initialize(){
// 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);
}
|