Needed to change an air-fan. Mowed/mounted over a lid regulating the airflow. The lid is turned by a servo motor. To find out the new positions I try to run a short tesprogram under Python3
First in terminalwindow I start the sudo pigpiod
Then start Python 3
Write commando after the pyton prompt>>>>
This is the program I wrote doing the same job.
pi = pigpio.pi() # Connect to local Pi.
pi.set_servo_pulsewidth(12, 1550) #closed
pi.set_servo_pulsewidth(12,1400) #open a little
The problem is when pi.stop( )is executed the servomotor has small diminutive vibrations and the big problem is it doesn't release the motor. So I can not turn the lid by hand untill I shut of power from the engine. And after reconnected the power the lid/servomotor turns imidiatly back to the latest position.
What shall I write to avoid this?
I need to able to turn the lid/servomotor by hand, free it up, and the "main" program shall turn it to the next position where ever I have turned it. But let it wtay where I put it untill that time.
Some helping with this , maybee Joan?