![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
hh
Diff: main.cpp
- Revision:
- 0:72d4b85a83f7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 22 05:02:30 2014 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalOut gpo(D13); +//DigitalOut led(LED_RED); +Serial pc(USBTX, USBRX); + +int main() +{ + char ch; + while (true) { + pc.puts("enter\n"); + ch = pc.getc(); + if(ch == 'h') + {gpo = 1; + pc.puts("high\n");} + else + {gpo = 0; + pc.puts("low\n")} + } +} \ No newline at end of file