Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 4:18f5328ff5a3
- Parent:
- 3:e14a4ea167ca
- Child:
- 6:ed97e4324202
--- a/main.cpp Wed Mar 25 16:42:21 2015 +0000 +++ b/main.cpp Thu Mar 26 02:19:18 2015 +0000 @@ -218,10 +218,17 @@ { //left_counter += (128-black_center_value); //left_counter+=20; + + /* if(left_counter<-0.38) left_counter=-0.5; else left_counter= -0.4; + */ + + if (left_counter >-.5) + left_counter -=.1; + turn_left=true; turn_right=false; @@ -230,7 +237,7 @@ { //left_counter += (128-black_center_value); //left_counter+=20; - left_counter=-0.6; + left_counter=-0.56; turn_left=true; turn_right=false; @@ -243,10 +250,16 @@ //right_counter += black_center_value; //right_counter +=20; + /* if (right_counter >.38) right_counter =.5; else right_counter =.4; + */ + + if (right_counter <.5) + right_counter +=.1; + turn_left=false; turn_right=true; @@ -255,7 +268,7 @@ { //right_counter += black_center_value; //right_counter +=20; - right_counter =.6; + right_counter =.56; turn_left=false; turn_right=true;