|
Re: how to limit pwm on easyc
The easiest way would be to set up an if statement where if the motor value > 200, set the motor to 200. You would take the value from the joystick (use an OI to PWM block) and instead of setting it to a PWM port, set it to a variable. Then, with an if statement, limit the values to whatever range you want. Finally, send that variable to a setpwm block with that variable set as the speed.
|