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.
Fork of serial-test by
Revision 2:c5683db5bf11, committed 2015-09-22
- Comitter:
- jensstruemper
- Date:
- Tue Sep 22 14:29:02 2015 +0000
- Parent:
- 1:58022b0070b7
- Commit message:
- LED1 blinks on RX
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Sep 07 16:05:09 2015 +0000 +++ b/main.cpp Tue Sep 22 14:29:02 2015 +0000 @@ -1,9 +1,14 @@ #include "mbed.h" - Serial pc(USBTX, USBRX); - +DigitalOut led(LED1); int main() { while(1) { + if (pc.getc()==0){ + led = 0; + } + else { + led = 01; + } pc.putc(pc.getc()); } }