a
Dependencies: mbed
Revision 0:844b59bc86ef, committed 2015-01-28
- Comitter:
- bulmenwt
- Date:
- Wed Jan 28 07:50:54 2015 +0000
- Commit message:
- a
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 844b59bc86ef main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jan 28 07:50:54 2015 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + +DigitalOut Led1(LED1); +DigitalOut Led2(LED2); +DigitalOut Led3(LED3); +DigitalOut Led4(LED4); + + +Serial fs(USBTX, USBRX); +char ch; + + +int main() { + + fs.printf("LED schalten mittels UART\r\n"); + fs.printf("FSST 3AHELI\r\n"); + fs.printf("Druecken Sie eine Taste 1, 2, 3 oder 4 (LED)\r\n"); + + while(1) { + + ch=fs.getc(); + + if (ch=='1') Led1=!Led1; + else if (ch=='2') Led2=!Led2; + else if (ch=='3') Led3=!Led3; + else if (ch=='4') Led4=!Led4; + + } +}
diff -r 000000000000 -r 844b59bc86ef mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 28 07:50:54 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file