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: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
Diff: mbed_source/Calibrator.cpp
- Revision:
- 49:4475f0760594
- Parent:
- 46:853966aab733
--- a/mbed_source/Calibrator.cpp Tue Apr 11 15:59:30 2017 +0000 +++ b/mbed_source/Calibrator.cpp Tue Apr 11 20:00:27 2017 +0000 @@ -9,11 +9,10 @@ void Calibrator::calibrate() { - float angle = 50; - - while(!is_bumper_pressed) + float angle; + + for(angle = 50; !is_bumper_pressed && angle <= 125; angle++) { - printf("Angle: %f\r\n", angle); servomotor.set_angle(angle); angle++; wait_ms(25);