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:
1:6a67ad238815
Parent:
0:fa6bc104fe2d
Child:
2:7b09d04f029b
--- a/main.cpp	Mon Sep 08 08:22:07 2014 +0000
+++ b/main.cpp	Mon Sep 08 08:43:00 2014 +0000
@@ -37,31 +37,31 @@
         PC_DEBUG(">>> Bluetooth read [%c]\n", cmd);
         switch(cmd)
         {
-        case 1: // Forward
+          case '1': // Forward
             bot.forward(speed);
             break;
-        case 2: // Backward
+          case '2': // Backward
             bot.backward(speed);
             break;              
-        case 3: // Left
+          case '3': // Left
             bot.left(speed);
             break;
-        case 4: // Right
+          case '4': // Right
             bot.right(speed);
             break;              
-        case 5: // Turn left
+          case '5': // Turn left
             bot.turn_right(speed);
             break;
-         case 6: // Turn right
+          case '6': // Turn right
             bot.turn_left(speed);
             break; 
-         case 7: // Slow
+          case '7': // Slow
             speed = 0.4;
             break;
-         case 8: // Fast
+          case '8': // Fast
             speed = 1.0;
             break;
-         default: // Stop
+          default: // Stop
             bot.stopAll();
             break;
          }