title: Controlling continuous servo using python in Raspberry Pi，but the continuous servo can't stop
body: <p>I'm trying to control a continuous servo(DF15RSMG) using python in Raspberry Pi, but the continuous servo can't stop. Code as follows:</p>
  
  <pre><code>import RPi.GPIO as GPIO  
  import time  
  import signal  
  import atexit  
  
  atexit.register(GPIO.cleanup)    
  
  GPIO.setmode(GPIO.BCM)  
  GPIO.setup(17, GPIO.OUT, initial=False)  
  p = GPIO.PWM(17,50) #50HZ  
  p.start(0)  
  time.sleep(2)  
  
  while(True):  
    for i in range(0,181,10):  
      p.ChangeDutyCycle(2.5 + 10 * i / 180)  
      time.sleep(0.02)                       
      p.ChangeDutyCycle(0)                    
      time.sleep(0.2)  
  
    for i in range(181,0,-10):  
      p.ChangeDutyCycle(2.5 + 10 * i / 180)  
      time.sleep(0.02)  
      p.ChangeDutyCycle(0)  
      time.sleep(0.2)  
  </code></pre>
  
  <p>Code above is work for SG90 Servo.Having seen this question <a href="https://stackoverflow.com/questions/44306373/raspberry-pi-servo-doesnt-stop][1]">Raspberry pi servo doesn&#39;t stop</a> ,but I still haven't know how to solve this problem,What should I do?</p>