supasorn wrote:Thanks Joan!
When I first turn on Pi, the servo is free -- no resisting motion. After I run the code, finish execution, the resisting motion is still there. I tried running python in interactive and non-interactive, both giving the same result and servo isn't free once PWM has be setup. I can't find anyway to stop PWM except reboot.
Edit-- the model is sub-mirco Tower Pro SG51R. I'm using hardware PWM at pin 18.
You can stop PWM on gpio 18 by changing the mode from ALT5 to any other mode, say INPUT or OUTPUT.
As I say I'm fairly sure there won't be pulses. If you want to make sure you could use my piscope
to see activity on the gpios.