I'm currently developping (improving) an Octoprint plugin that is used to control servo motors with the pigpio library.
I always thought that I had to initialize the servos at the start of the code by sending a pulsewidth of 0 μs, doing pi.set_servo_pulsewidth(pin, 0)
on Python http://abyz.me.uk/rpi/pigpio/python.html#set_servo_pulsewidth .
My problem is that I need to read the actual angular position of the servo on start. And after "initializing" it, I would get '0' after settings the pulsewidth to 0 by using pi.get_servo_pulsewidth(pin)
on the same GPIO.
After reading the doc, I think that I just don't need at all to initialize the servo, and I could get the actual pulsewidth at the start of the code....
Does anybody could answer me by experience or try it please ? I don't have any Raspberry or servo motor where I am currently.
Thanks