Guess what these do!
Timer1.setPwmDuty(outPwm, output);
digitalWrite(outDir, dir);
The output of the PID is driving direction and PWM pins at the end of doPID.
If you've got two pins for direction its simple to extend this!
Guess what these do!
Timer1.setPwmDuty(outPwm, output);
digitalWrite(outDir, dir);
The output of the PID is driving direction and PWM pins at the end of doPID.
If you've got two pins for direction its simple to extend this!