Ian Wolf
/
TestSerialRead
REV1
Revision 0:3fe66c61112d, committed 2017-08-22
- Comitter:
- iwolf32
- Date:
- Tue Aug 22 19:59:54 2017 +0000
- Commit message:
- Rev1;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Aug 22 19:59:54 2017 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include <string> + +Serial pc(SERIAL_TX, SERIAL_RX); + +int main() { + pc.baud(250000); + char c[5]; + while (pc.readable()) { + pc.scanf("%s", &c); + } + +pc.printf(c); + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Aug 22 19:59:54 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/e2bfab296f20 \ No newline at end of file