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:

  1. Controlling the LEDS
  2. Move forward and backward
  3. Turn
  4. Read the sensor values
  5. Use a PID controller
Revision:
4:3743cbfe031b
Parent:
2:356bb8d99326
Child:
6:0dc4e4225881
--- 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,