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
Diff: main.cpp
- Revision:
- 7:cb07cdb35b6c
- Parent:
- 6:477382219bcf
- Child:
- 8:5ed6685f6edd
diff -r 477382219bcf -r cb07cdb35b6c main.cpp
--- a/main.cpp Tue Mar 26 16:19:47 2019 +0000
+++ b/main.cpp Thu Mar 28 01:07:54 2019 +0000
@@ -14,9 +14,8 @@
//Green D9
//Red D5
int main() {
- char c;
- //Serial hm10(PA_11, PA_12);
- //hm10.baud(9600);
+ Serial hm10(PA_11, PA_12);
+ hm10.baud(9600);
DigitalOut enable(PA_13);
enable.write(1);
@@ -38,21 +37,13 @@
rbt.rbtInit();
while(1)
{
-
+ if(hm10.readable())
+ {
+ rbt.setState(hm10.getc());
+ }
}
}
/*
-if(hm10.readable())
- {
- c = hm10.getc();
- if(c=='R')
- {
-
- }
- else if(c=='F')
- {
-
- }
- }
+
*/