a
Dependencies: mbed
Revision 0:0a1b9b4666c7, committed 2015-01-28
- Comitter:
- bulmenwt
- Date:
- Wed Jan 28 07:52:09 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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jan 28 07:52:09 2015 +0000 @@ -0,0 +1,40 @@ +#include "mbed.h" + +DigitalOut Led1(LED1); +DigitalOut Led2(LED2); +DigitalOut Led3(LED3); +DigitalOut Led4(LED4); + +Serial pc(USBTX, USBRX); // tx, rx +char ch; + + + +int main() { + pc.baud(19200); + pc.printf("LED schalten mittels Raspberry PI!\r\n"); + pc.printf("DI Franz Wolf (WF)\r\n"); + pc.printf("Drücken Sie 1, 2, 3 oder 4 (LED) <n>\r\n"); + while (1) { + ch = pc.getc(); + + /* Led4=1; + wait(1.0); + Led4=0; + wait(1.0); + */ + + switch (ch) { + case '1': //Wave-Drive-Betrieb (Wellenschritt-Modus)rechts + Led1 = !Led1; + break; + + case '2': //Wave-Drive-Betrieb (Wellenschritt-Modus)links + Led2 = !Led2; + break; + + default: pc.printf("nichts ist irgendwas\n"); break; + + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 28 07:52:09 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file