Samenwerking Groep 12

Dependencies:   Encoder MODSERIAL HIDScope mbed

Foo

Revision:
3:61c024f896ad
Parent:
2:3de3c5eb400f
Child:
4:a92d354265b2
--- a/main.cpp	Mon Sep 21 09:59:58 2015 +0000
+++ b/main.cpp	Mon Sep 21 10:43:37 2015 +0000
@@ -11,15 +11,17 @@
 int main()
 {
     while(true) {
-        if (button.read() == 0) {
+        if (button.read() == 0) {   //if button pressed
             motor2direction = 1;
             motor2speed = 0.3f;
-        } else {
+        } else {                    // If button is not pressed
             motor2direction = 0;
             motor2speed = 0.3f;
         }
+        double position = getPosition();
+        printf("positie = %d", position);
     }
 }
 
 // Geen functie hieronder nog
-Encoder encoder1(D13,D12);
\ No newline at end of file
+// Encoder encoder1(D13,D12);
\ No newline at end of file