Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Revision:
8:05e1109a26fc
Parent:
7:99ac79d04dda
--- a/main.cpp	Wed Oct 02 08:39:16 2019 +0000
+++ b/main.cpp	Thu Oct 03 12:16:22 2019 +0000
@@ -10,6 +10,10 @@
 PwmOut e2(D6);
 DigitalOut motor2(D7); 
 
+DigitalIn encoder1a(D12);
+DigitalIn encoder1b(D13);
+AnalogIn pot1(A1);
+AnalogIn pot2(A2);
 
 MODSERIAL pc(USBTX, USBRX);
 
@@ -18,7 +22,17 @@
 {
   pc.baud(115200);
   pc.printf("\r\nStarting...\r\n\r\n");
-  int value;
+  
+  while(true)
+  {
+    pc.printf(encoder1a.read());
+    pc.printf(encoder1b.read());
+    wait_ms(1000);
+    }
+    
+} 
+ 
+  /* int value;
   int HIGH = 1;
   for(value = 0 ; value <= 255; value+=5)   //speed test
   {
@@ -27,8 +41,10 @@
     e1.write(value);    //PWM Speed Control
     e2.write(value);    //PWM Speed Control
     wait_ms(30);
-    pc.printf("%f",value);
+    pc.printf("%f",value); 
+    }
+    */
+ 
+  
 
-  }
-}