Code to run the microcontrollers on the R5 competition bot
Dependencies: LineSensors mbed
Diff: DriveController.cpp
- Revision:
- 18:2bd595af51d2
- Parent:
- 17:5046b27f5441
--- a/DriveController.cpp Sat Apr 18 03:02:28 2015 +0000 +++ b/DriveController.cpp Sat Apr 18 03:13:27 2015 +0000 @@ -10,7 +10,10 @@ sensors(PTC7, PTC0, PTC3, PTC4, PTC5, PTC6, PTC10, PTC11, PTC9, PTC8, PTA5, PTA4, PTA12, PTD4, PTA2, PTA1, PTC12, PTC13, PTC16, PTC17, PTD1, PTD0, PTD5, PTD13), orient(NORTH) { - + sensors.setThreshold(); + wait(10); + treadSpeed1.period_us(50); //setting pwm period for all wheels to 20khz + treadSpeed2.period_us(50); } void DriveController::move(typename ::abs_direction dir)