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
Revision 4:3743cbfe031b, committed 2015-02-24
- Comitter:
- pcordemans
- Date:
- Tue Feb 24 09:06:29 2015 +0000
- Parent:
- 3:b5d18690f357
- Child:
- 5:355240d7126b
- Commit message:
- removed racing_robots.h
Changed in this revision
--- a/racing_robots.cpp Tue Feb 24 09:01:06 2015 +0000 +++ b/racing_robots.cpp Tue Feb 24 09:06:29 2015 +0000 @@ -1,4 +1,4 @@ -#include "racing_robots.h" +#include "robot_logic.h" // External functions called from our library extern void init(void);
--- a/racing_robots.h Tue Feb 24 09:01:06 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#include "mbed.h" -#include "m3pi.h" -#include "robot_logic.h" - -#ifndef H_RACING_ROBOTS -#define H_RACING_ROBOTS - -#endif \ No newline at end of file
--- a/robot_logic.h Tue Feb 24 09:01:06 2015 +0000 +++ b/robot_logic.h Tue Feb 24 09:06:29 2015 +0000 @@ -1,9 +1,9 @@ +#ifndef H_ROBOT_LOGIC +#define H_ROBOT_LOGIC + #include "mbed.h" #include "m3pi.h" -#ifndef H_ROBOT_LOGIC -#define H_ROBOT_LOGIC - typedef enum { LED_1 = 0, LED_2 = 1,