![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Erster Versuch
main.cpp
- Committer:
- werkmeister01
- Date:
- 2013-11-05
- Revision:
- 0:c7ab26aac972
File content as of revision 0:c7ab26aac972:
#include "mbed.h" // mbed Interface Hardware definitions DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); // Host PC Communication channels Serial pc(USBTX, USBRX); // tx, rx int main() { int x; pc.printf("LED Test\n\r"); x=3; switch(x) { case 1: myled1=1; myled2=0; myled3=0; myled4=0; break; case 2: myled1=0; myled2=1; myled3=0; myled4=0; break; case 3: myled1=0; myled2=0; myled3=1; myled4=0; break; case 4: myled1=0; myled2=0; myled3=0; myled4=1; break; default: pc.printf("Ooooops\n\r"); break; } }