![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Code to run the microcontrollers on the R5 competition bot
Dependencies: LineSensors mbed
r5map.h
- Committer:
- jmar11
- Date:
- 2015-04-18
- Revision:
- 17:5046b27f5441
- Child:
- 18:2bd595af51d2
File content as of revision 17:5046b27f5441:
#include "DriveController.h" int main() { DriveController myWheels; myWheels.sensors.setThreshold(); wait(10); myWheels.treadSpeed1.period_us(50); //setting pwm period for all wheels to 20khz myWheels.treadSpeed2.period_us(50); //spinTest(); while(true) //test loop { myWheels.move(FORWARD); wait(0.5); myWheels.move(FORWARD); wait(0.5); myWheels.rotate((myWheels.orient+2)%4); wait(0.5); } return 0; }