![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
..
Dependencies: HIDScope MODSERIAL biquadFilter mbed
Diff: main.cpp
- Revision:
- 4:fbea05c8fe2b
- Parent:
- 3:a3ad58758696
- Child:
- 5:107eb09fb095
--- a/main.cpp Tue Sep 11 15:06:12 2018 +0000 +++ b/main.cpp Sun Sep 16 13:49:23 2018 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "MODSERIAL.h" +DigitalOut gpo(D0); DigitalOut myled(LED_GREEN); MODSERIAL pc(USBTX, USBRX); DigitalIn button(PTA4); @@ -9,16 +10,15 @@ { pc.baud(115200); pc.printf("Hello World!\r\n"); + char c; + c = pc.getc(); + pc.printf(" %c \n",c); while (true) { - myled==1; - - if (button==0) - { - wait(0.5f); // wait a small period of time - pc.printf("%c \n",c); - myled = !myled; // toggle a led - } + gpo = !gpo; + myled = !myled; // toggle a led + wait (0.2f); } } +