Controlling servos with sliders

does any one have an example where you control the slew rate of servos? I’m controlling multiple servos with sliders and I’d like to smooth out the motion by limiting acceleration

1 Like

First you need a variable which will hold the current value of the servo. That is the value which will be sent out. You then need a timer function which will be called, say every 50mS, or whatever rate that suits. Within that function a comparison is made between the incoming slider value and the current value of the servo. If it is greater, then increment the servo value by x amount until it reaches the slider value. Equally decrement if the slider value is less.
Changing the timer slots and increment / decrement value should get the desired slew rate.

Thanks. Sounds do able in the Ardunio environment.