FET10 if else Abfrage

Dependencies:   mbed

Revision:
0:4aa802fdf78e
diff -r 000000000000 -r 4aa802fdf78e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 22 18:27:51 2012 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+
+DigitalIn taster(p20); // Deklaration des tasters auf pin 10
+DigitalIn taster2(p19);
+
+DigitalOut LED (LED1);
+DigitalOut Led2(LED2);
+DigitalOut Led4 (LED4);
+Serial pc(USBTX, USBRX); // Serielle Schnittstelle
+ 
+int main()
+ {
+    while(1) 
+    {
+    
+    if (taster==1){
+    LED=1;}
+    else{
+    LED=0;
+    }
+    if(taster2==1){
+    Led2=1;
+    }
+    else{
+    Led2=0;
+    }
+    if(taster==1&&taster2==1)
+    {
+    Led4=1;
+    }
+    else
+    {
+    Led4=0;
+    }
+  }}