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.
Dependencies: mbed TCS3472_I2C Tach ContinuousServo
Revision 1:99d1aa030525, committed 2019-04-22
- Comitter:
- ewingswim
- Date:
- Mon Apr 22 14:47:32 2019 +0000
- Parent:
- 0:97e8d0a2752d
- Commit message:
- brightness;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 97e8d0a2752d -r 99d1aa030525 main.cpp --- a/main.cpp Wed Apr 17 14:12:50 2019 +0000 +++ b/main.cpp Mon Apr 22 14:47:32 2019 +0000 @@ -35,9 +35,27 @@ left.speed(0.1); right.speed(-0.105); //right negative to go forward + LB = PWMbrightness; //set brightness of sensor LED rgb_sensor.getAllColors(rgb_data); + if(rgb_data[0] > 1000 && rgb_data[0]<5000){ + left.speed(0.3); + right.speed(-0.305); + } + if (rgb_data[0]>5000) + { left.speed(0.35); + right.speed(-0.3); + } + if(rgb_data[0] < 1000) + { left.speed(0.25); + right.speed(-0.35); + } + + + + + if ((rgb_data[0] > 10000)) { blue = 0;