You could create a loop in the rules and use a variable to keep track of the current state of the servo.
Code: Select all
on openevent do
let,2,30 // var#1 = cur position, var#2 = target position
let,3,([var#2]-[var#1])/10 // Step size
loopTimerSet_ms,1,500,10 // 10 loop steps of 500 msec each
endon
on Rules#Timer=1 do
let,1,[var#1]+[var#3]
Servo,0,12,[var#1]
endon
Not tested, so wouldn't be surprised if the sign of [var#3] is wrong, and you should also make sure to initialize the Servo position and [var#1] at boot.
Also it is a good idea to turn off the PWM signal after moving to conserve energy and extend the life of the servo.
You can set the servo to "position" 9000 to turn the servo off.