Erster Versuch

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
werkmeister01
Date:
Tue Nov 05 07:21:25 2013 +0000
Commit message:
Test01

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	Tue Nov 05 07:21:25 2013 +0000
@@ -0,0 +1,50 @@
+#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;  
+   }
+}
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 05 07:21:25 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file