proberen motor

Dependencies:   QEI mbed

Revision:
0:8ed7e7bbc391
Child:
1:e415c6eda278
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 26 13:40:12 2016 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+
+DigitalIn switch2(SW2);
+DititalIn switch3(SW3);
+DigitalOut  groen(LED_GREEN);
+DigitalOut  rood(LED_RED);
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    groen = 1;
+    rood = 1;
+    
+    while (true){
+    
+        if (SW2 == 0){
+            groen = 0;
+            rood = 1;
+            }
+        else if (SW3 == 0){
+            groen = 1;
+            rood = 0;
+            }
+        else{
+            groen = 1;
+            rood = 1;
+        }
+    }
+}    
+        
\ No newline at end of file