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: HIDScope MODSERIAL biquadFilter mbed
Fork of Project_script by
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); } } +