Denver / Mbed 2 deprecated denver_train_proj

Dependencies:   mbed TextLCD

Revision:
31:7637861f4dc7
Parent:
30:293ee760d357
Child:
32:e5b732fb8e65
diff -r 293ee760d357 -r 7637861f4dc7 main.cpp
--- a/main.cpp	Tue Jun 12 10:47:59 2018 +0000
+++ b/main.cpp	Tue Jun 12 12:12:00 2018 +0000
@@ -98,8 +98,13 @@
 const unsigned int SWBflip_3 = 0x84; //Flip SW3
 const unsigned int SWBflip_4 = 0x88; //Flip SW4
 
-//Array that will keep track of the position of th trains. (-1 = not in track/any other number = sensor where the train is at)
+//Arrays that will keep track of the position and direction of th trains.
+//[pos_trains] -1 = not in track / any other number = sensor where the train is at (sensors 1-16)
+//[dir_trains] -1 = left / 1 = right
 int pos_trains [2] = {-1,-1};
+int dir_trains [2] = {-1,-1};
+
+
 
 
 
@@ -182,7 +187,7 @@
 *
 **/
 
-void printZeros(unsigned int number){
+void train_pos_update(unsigned int number){
     
     /*
     bitset <sizeof(unsigned int) * 8> n (number);