Team Ascent / Mbed 2 deprecated TDPCode1

Dependencies:   mbed

Revision:
6:dd0a91c2994f
Parent:
5:22d7fee2e26e
--- a/main.cpp	Wed Mar 11 18:00:33 2015 +0000
+++ b/main.cpp	Wed Mar 11 22:01:14 2015 +0000
@@ -64,13 +64,13 @@
     int x = 0;
 
     //static int values[8];
-    while( x <= 3 ) {
+    while( x <= 3 ) { //why 3? Don't you want to select through 8 sensors therefore x<=7? 
         sensor_select(x);
         //blue = !blue;
         wait(0.1);
         
         if (input == 1) {
-            val=val+2^x;
+            val=val+2^x; //could you comment on what this is for? 
         } else {
             val=val;//+2^x;
         }
@@ -139,7 +139,7 @@
             break;
         }
         case 0x01: { //to far left turn right 0001
-            set_direction(0x11, 0.5, 0.0);
+            set_direction(0x11, 0.5, 0.0); //this doesn't turn right; this goes straight at half speed
             wait(1);
             Line_right = !Line_right;
             break;