No. analogWrite() only takes values from 0 to 255.
That is what SetMotorDirectionLower() and SetMotorDirectionHigher() are for. Write those two functions to set the motor direction.
And don't leave out the part about myPID.setOutputLimits().
No. analogWrite() only takes values from 0 to 255.
That is what SetMotorDirectionLower() and SetMotorDirectionHigher() are for. Write those two functions to set the motor direction.
And don't leave out the part about myPID.setOutputLimits().