Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BluetoothSerial SeeedShieldBot mbed
Fork of Seeed_BlueBot_demo by
Diff: main.cpp
- 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;
}
