Nucleo board with Seeed bot and bluetooth shields demo.

Dependencies:   BluetoothSerial SeeedShieldBot mbed

This code shows a simple application composed of a Nucleo board, a Seeed Bot and Seeed Bluetooth shieds:

This picture shows how the three boards are stacked together:

/media/uploads/bcostm/nucleo_bluetooth_bot.jpg

You will need also to use an application on your phone to send Bluetooth commands and to be able to control the Bot shield. We have used the Bluetooth spp tools pro Android application.

Look at this video to have more details about this demo:

Revision:
4:5dd60bfc3cdd
Parent:
3:68fe5b9e069a
Child:
5:de5b38436960
--- a/main.cpp	Thu Oct 16 06:18:14 2014 +0000
+++ b/main.cpp	Fri Oct 24 08:27:19 2014 +0000
@@ -14,8 +14,11 @@
     A0, A1, A2, A3, A4 // Sensors pins (all DigitalIn)
 );
 
+// Disable the feature by wiring A5 to GND
+DigitalIn ReadSensorsEnabled(A5, PullUp);
+
 // Enable it for debugging on hyperterminal
-#define DEBUG 1
+#define DEBUG 0
 #if DEBUG == 1
 Serial pc(PC_10, PC_11);
 #define PC_DEBUG(args...) pc.printf(args)
@@ -104,10 +107,10 @@
     bot.right(speed);
     wait(0.2);
     bot.stopAll();
-
+    
     while (1) {
         // Stop the motors if a sensor has detected something.
-        if (!bot.rightSensor || !bot.inRightSensor || !bot.centreSensor || !bot.inLeftSensor || !bot.leftSensor)
+        if ((!bot.rightSensor || !bot.inRightSensor || !bot.centreSensor || !bot.inLeftSensor || !bot.leftSensor) && ReadSensorsEnabled)
         {
             if (!stop) bot.stopAll();
             stop = 1;