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: mbed
Fork of RCControlOOP by
Diff: WirelessMousr.cpp
- Revision:
- 1:e694ee3b4a7f
- Parent:
- 0:78e2af20cbf3
- Child:
- 2:e9042e88abf1
--- a/WirelessMousr.cpp Mon Sep 08 11:32:04 2014 +0000 +++ b/WirelessMousr.cpp Sun Sep 21 14:43:47 2014 +0000 @@ -16,15 +16,17 @@ pc.putc(10); // state machine - switch(state) { + switch(state) + { case 's': this->stop(); break; case 'w': + pc.putc('g'); this->straight(getStraightSpeed()); break; case 'a': - this->left(getRotateSpeed()); wait(0.25); stop(); break; + this->left(getRotateSpeed()); break; case 'd': - this->right(getRotateSpeed()); wait(0.25); stop(); break; + this->right(getRotateSpeed()); break; case 'x': this->backwards(getStraightSpeed()); break; case 'q': @@ -35,5 +37,9 @@ this->left(getRotateSlowSpeed()); break; case 'c': this->right(getRotateSlowSpeed()); break; + case '1': + this->flipLeft(); break; + case '3': + this->flipRight(); break; } } \ No newline at end of file