Jens Strümper
/
printf-debug
Use nrf51-dk as a FTDI 232
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 |
diff -r 58022b0070b7 -r c5683db5bf11 main.cpp --- 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()); } }