summaryrefslogtreecommitdiffstats
path: root/src/init.c
blob: a59dcba2405a8e17896b0fd9864d95bfd5b2d070 (plain)
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
#include <main.h>

Gyro gyro;
unsigned int imeCount;

void initializeIO(){
	pinMode(ANALOG_PORT(1),INPUT_ANALOG);	// Power expander status port
	pinMode(1,OUTPUT);						// LED
	pinMode(2,INPUT);
	pinMode(3,INPUT);
	pinMode(4,INPUT);
}

void initialize(){

	//	Initialize the LCDs.

	lcdInit(uart1);
	lcdClear(uart1);
	lcdSetBacklight(uart1,1);

	//	Setup sensors.

	imeCount = imeInitializeAll();
	gyro=gyroInit(2,0);

	lcdPrint(uart1,1,"%u IMEs :)",imeCount);
	delay(1000);
	lcdPrint(uart1,1,"ready...");
	delay(1000);

}