Arduino Segway, PID regulated with antiwindup for motor and filtered derivative.
PID library contains 3 different PID's, they are selected by using the different constructors
PID(double kp, double ki, double kd, double cycletime) normal PID
PID(double kp, double ki, double kd, double cycletime, bool motorMaxPowerReached) PID with antiwindup
PID(double kp, double ki, double kd, double cycletime, bool motorMaxPowerReached, double HZcutoff) PID with antiwindup and filtered derivative
The error is filtered using a second order Butterworth filter, the filter with calculate the coefficients during the start-up sequence of the Arduino.
made to work with Arduino Bluetooth Controlled Joystick App from Uncia Robotics
https://play.google.com/store/apps/details?id=uncia.robotics.joystick&hl=en&gl=US