Racing Robots Session
Dependencies: MbedJSONValue m3pi
This is the library for the Racing Robots session. It supports the M3PI robot of Polulu.
It is based on the "Arduino" principle of the init and loop function.
Just add a main.cpp file which contains:
Racing Robots main file
#include "robot_logic.h" void init() { //put your initialization logic here } void loop() { //put your robot control logic here }
Features include:
- Controlling the LEDS
- Move forward and backward
- Turn
- Read the sensor values
- Use a PID controller
racing_robots.cpp
- Committer:
- dwini
- Date:
- 2015-02-23
- Revision:
- 0:c0ae66a0ec7a
- Child:
- 1:43c91152e9ce
File content as of revision 0:c0ae66a0ec7a:
#include "racing_robots.h" DigitalOut myled(LED1); extern void loop(void); extern void init(void); void _init(void) { // DO our init here init(); // Students init } void racing_robots(void) { // Initialize system _init(); while (true) { loop(); // Students loop } } int main (void) { racing_robots(); }