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:
- 13:bdb92f041eca
- Parent:
- 12:8ae6609a66bf
--- a/main.cpp Fri Oct 28 09:10:58 2016 +0000 +++ b/main.cpp Wed Nov 30 11:27:36 2016 +0000 @@ -115,15 +115,18 @@ //follow line if (LDRvalueright < VBORDER2 && LDRvalueleft > VBORDER1){ //ldr right is in the black and ldr left is in the white then turn right // turn right - + ServoRight.write(0.5); + ServoLeft.write(0.4); } if (LDRvalueright > VBORDER1 && LDRvalueleft < VBORDER2){ //ldr right is in the white and ldr left is in the black - //turn left - + //turn left + ServoRight.write(0.6); + ServoLeft.write(0.5); } - if LDRvalueright < VBORDER2 && LDRvalueleft < VBORDER2) { //both ldr right and ldr left are in the black, continue ahead + if (LDRvalueright < VBORDER2 && LDRvalueleft < VBORDER2) { //both ldr right and ldr left are in the black, continue ahead //go straight - + ServoRight.write(0.6); + ServoLeft.write(0.4); }