Code to run the microcontrollers on the R5 competition bot

Dependencies:   LineSensors mbed

Revision:
1:fa6eb0c33b2f
Parent:
0:e60f22c1d573
Child:
2:d0ce8e26cbc4
--- a/DriveController.h	Sat Sep 20 07:15:05 2014 +0000
+++ b/DriveController.h	Wed Sep 24 21:03:56 2014 +0000
@@ -7,40 +7,47 @@
     NORTH,
     SOUTH,
     EAST,
-    WEST,
+    WEST
 };
 
 class DriveController
 {
 private:
-    DigitalOut wheel1();
-    DigitalOut wheel2();
-    DigitalOut wheel3();
-    DigitalOut wheel4();
-    
-    DigitalOut ready();
-    
-    DigitalIn command1();
-    DigitalIn command2();
-    DigitalIn command3();
+    DigitalOut wheel1(PTC1);
+    DigitalOut wheel2(PTC2);
+    DigitalOut wheel3(PTE29);
+    DigitalOut wheel4(PTE30);
     
-    DigitalIn floorSensor1();
-    DigitalIn floorSensor2();
-    DigitalIn floorSensor3();
-    DigitalIn floorSensor4();
-    DigitalIn floorSensor5();
-    DigitalIn floorSensor6();
-    DigitalIn floorSensor7();
-    DigitalIn floorSensor8();
-    DigitalIn floorSensor9();
+    DigitalIn floorSensor1(PTC7);
+    DigitalIn floorSensor2(PTC0);
+    DigitalIn floorSensor3(PTC3);
+    DigitalIn floorSensor4(PTC4);
+    DigitalIn floorSensor5(PTC5);
+    DigitalIn floorSensor6(PTC6);
+    DigitalIn floorSensor7(PTC10);
+    DigitalIn floorSensor8(PTC11);
+    DigitalIn floorSensor9(PTC9);
+    DigitalIn floorSensor10(PTC8);
+    DigitalIn floorSensor11(PTA5);
+    DigitalIn floorSensor12(PTA4);
+    DigitalIn floorSensor13(PTA12);
+    DigitalIn floorSensor14(PTD4);
+    DigitalIn floorSensor15(PTA2);
+    DigitalIn floorSensor16(PTA1);
+    DigitalIn floorSensor17(PTC12);
+    DigitalIn floorSensor18(PTC13);
+    DigitalIn floorSensor19(PTC16);
+    DigitalIn floorSensor20(PTC17);
+    DigitalIn floorSensor21(PTD2);
+    DigitalIn floorSensor22(PTD0);
+    DigitalIn floorSensor23(PTD5);
+    DigitalIn floorSensor24(PTD13);
+       
+    Direction orientation = NORTH;
     
-    AnalogIn wallSensorFront();
-    AnalogIn wallSensorRear();
-    AnalogIn wallSensorRight();
-    AnalogIn wallSensorLeft();
+    bool sensorArray[24];
     
     void move(Direction);
-    void readCommand();
     void readSensors();
     
 public: