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: AX12
Diff: main.cpp
- Revision:
- 1:98b4e06bec81
- Parent:
- 0:9f596b4d0cc6
--- a/main.cpp Fri Apr 22 17:54:44 2016 +0000
+++ b/main.cpp Fri Apr 22 18:29:43 2016 +0000
@@ -2,8 +2,19 @@
#include "AX12.h"
int main() {
+ Serial pc(USBTX, USBRX);
AX12 MX106(PA_10, PB_6, PB_5, 1, 57600);
- MX106.SetMode(1);
- MX106.SetCRSpeed(0.25);
+ pc.printf("Start run!");
+ char txt;
+ while (1) {
+ if (pc.readable()) {
+ txt = pc.getc();
+
+ if (txt =='r') {
+ pc.printf("In the if");
+ MX106.SetMode(1);
+ MX106.SetCRSpeed(0.25);}
+ }
+ }
}
\ No newline at end of file