PID en biquad filter implemented and outcommented

Dependencies:   Motor_with_encoder MODSERIAL mbed QEI

Fork of Tutorial_lecture5_pin_pot_motor by Biorobotics Project

Revision:
7:986a0c5fba0e
Parent:
6:b89ca8add6ee
--- a/main.cpp	Mon Oct 09 15:05:54 2017 +0000
+++ b/main.cpp	Wed Oct 11 06:57:28 2017 +0000
@@ -1,6 +1,7 @@
 #include "mbed.h"
 #include "MODSERIAL.h"
 #include "encoder.h"
+#include "QEI.h"
 // this program can turn the motor clockwise or counterclockwise depending on the value p or n typed into the terminal. with 's' you can stop the motor
 
 MODSERIAL pc(USBTX,USBRX);
@@ -13,8 +14,8 @@
 DigitalIn button2(D12);
 Ticker potmeterreadout;
 Ticker encoderreadout;
-Encoder motor1(PTD0,PTC4); // motor 1 is from encoder, otherwise it would be a pain in the ass to change all that code to motorencoder
-
+Encoder motor1(PTD0,PTC4, true); // motor 1 is from encoder, otherwise it would be a pain in the ass to change all that code to motorencoder
+//QEI motor1(PTD0, PTC4, NC, 64, QEI::X4_ENCODING);       // maybe the speed readout works when using X4 decoding... But this may break the code...
 
 float PwmPeriod = 0.0001f;