This code enables our mouse to go round the track using the two error methods.

Dependencies:   Nucleo_blink_led mbed

Fork of Nucleo_blink_led by Jamie Bignell

Revision:
7:11dd5581c763
Parent:
6:a652deaae134
--- a/findLineFunc.cpp	Sun Apr 01 18:21:50 2018 +0000
+++ b/findLineFunc.cpp	Sat Apr 28 21:34:55 2018 +0000
@@ -4,10 +4,10 @@
 void findLineFunc()
 {
     //TURN RIGHT UNTIL SENSOR A6, POSITION 6, BEATS THERSHOLD
-    leftMotorVal.pulsewidth_us(300); 
+    leftMotorVal.pulsewidth_us(350); 
     rightMotorVal.pulsewidth_us(0);     
     
-    while (((sensorPin[6]).read_u16()>>4) < (sensorThreshold[6]))  
+    while (((sensorPin[0]).read_u16()>>4) < (sensorThreshold[0]))  
     {
                  
     }