shubham c
/
Relay_testing
hh
Revision 0:72d4b85a83f7, committed 2014-12-22
- Comitter:
- ee12b079
- Date:
- Mon Dec 22 05:02:30 2014 +0000
- Commit message:
- hh
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 72d4b85a83f7 main.cpp --- /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
diff -r 000000000000 -r 72d4b85a83f7 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 22 05:02:30 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file