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: SoftSerial SDFileSystem mbed wave_player
Diff: main.cpp
- Revision:
- 6:0e1973fdfe28
- Parent:
- 4:a07612fbf279
- Child:
- 7:2b99a26e6a43
--- a/main.cpp Tue May 02 22:02:51 2017 +0000 +++ b/main.cpp Wed May 03 00:41:21 2017 +0200 @@ -1,6 +1,28 @@ #include "mbed.h" +#include "rtos.h" + +Serial out(p9, p10); //p9 +Serial in(p13, p14); //p14 + + +void receive_uart() { + while (true){ + if(in.readable()){ + char s[32]; + printf(in.gets(s, 32)); + }else{ + Thread::yield(); + } + } +} int main() { - printf("%s", "hello, term"); + printf("%s\n", "hello, term"); + + while (true){ + out.printf("hello, term\n"); + wait(1); + } + } \ No newline at end of file