Bluetooth program for the Seeed bot
Dependencies: BluetoothSerial SeeedShieldBot mbed
Fork of Seeed_BlueBot_demo by
Revision 1:6a67ad238815, committed 2014-09-08
- Comitter:
- bcostm
- Date:
- Mon Sep 08 08:43:00 2014 +0000
- Parent:
- 0:fa6bc104fe2d
- Child:
- 2:7b09d04f029b
- Commit message:
- Bug correction in switch/case.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }