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

Files at this revision

API Documentation at this revision

Comitter:
pcordemans
Date:
Tue Feb 24 09:01:06 2015 +0000
Parent:
2:356bb8d99326
Child:
4:3743cbfe031b
Commit message:
added mbed and m3pi sublibraries

Changed in this revision

m3pi.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
robot_logic.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m3pi.lib	Tue Feb 24 09:01:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/chris/code/m3pi/#4b7d6ea9b35b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Feb 24 09:01:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac
\ No newline at end of file
--- a/robot_logic.cpp	Mon Feb 23 14:37:37 2015 +0000
+++ b/robot_logic.cpp	Tue Feb 24 09:01:06 2015 +0000
@@ -4,6 +4,8 @@
 #define MAX_SPEED 100
 #define MAX_SENSOR 100
 #define MAX_REAL_SPEED 1.0
+#define MAX 0.3
+#define MIN 0
 
 // Static scope variables
 static m3pi m3pi;