summaryrefslogtreecommitdiffstats
path: root/src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/init.c b/src/init.c
index e85313d..f8154d7 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1,20 +1,34 @@
#include <main.h>
-void initializeIO(){
-}
+Sensor intakeFrontLeft,
+ intakeFrontRight,
+ intakeLiftBase,
+ intakeLiftTop,
+ robotGyro;
+
+Gyro gyro;
-void initialize(){
+bool initializeDone = false;
+
+void initializeIO(void){
+ intakeFrontLeft = initSensor(7,ANALOG);
+ intakeFrontRight = initSensor(6,ANALOG);
+ intakeLiftBase = initUltrasonic(1,2);
+ intakeLiftTop = initSensor(8,ANALOG);
+ //robotGyro = initSensor(2,GYRO);
+}
- pinMode(20,INPUT_ANALOG);
- pinMode(13,INPUT_ANALOG);
+void initialize(void){
+ lcdInit(uart2);
+ lcdClear(uart2);
+ lcdSetBacklight(uart2,true);
- lcdInit(LCD_PORT);
- lcdClear(LCD_PORT);
- lcdSetBacklight(LCD_PORT,true);
+ gyro = gyroInit(2,0);
- zGyroInit();
- zIMEInit();
+ imeInitializeAll();
- delay(1000);
+ lcdPrint(uart2,1," 5106 ZEPHYR ");
+ initializeDone = true;
+ delay(2000);
}