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:

Files at this revision

API Documentation at this revision

Comitter:
bcostm
Date:
Fri Oct 24 08:27:19 2014 +0000
Parent:
3:68fe5b9e069a
Child:
5:de5b38436960
Commit message:
Add option to disable the bot front sensors reading (default is enabled, wire A5 to GND to disable it)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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;