Werkcollege opgave 23 september BMT K9

Dependencies:   Encoder HIDScope MODSERIAL mbed QEI biquadFilter

Revision:
10:2f76fa4cd2a7
Parent:
9:832b48f48a10
Child:
11:73817c9df1e5
--- a/main.cpp	Thu Oct 01 12:52:46 2015 +0000
+++ b/main.cpp	Thu Oct 01 13:25:04 2015 +0000
@@ -5,18 +5,18 @@
 //Motor 2
 DigitalOut motor2direction(D4); //D4 en D5 zijn motor 2 (op het motorshield)
 PwmOut motor2speed(D5);
-DigitalIn buttonL1(PTC6);
-DigitalIn buttonL2(PTA4);
-DigitalIn buttonH1(D2);
-DigitalIn buttonH2(D6);
-AnalogIn potmeter(A1);
+//DigitalIn buttonL1(PTC6);
+//DigitalIn buttonL2(PTA4);
+//DigitalIn buttonH1(D2);
+//DigitalIn buttonH2(D6);
+//AnalogIn potmeter(A1);
 
 
 int main()
 {
-    while(true) {
-        double n = (potmeter.read()/250);
-        motor2direction = 1;
-        motor2speed = n;
+    for(float p = 0.0f; p < 1.0f; p += 0.01f) {
+        motor2speed = p;
+        wait(1);
+        break;
     }
-}
+}
\ No newline at end of file