'''
example name：360° servo
version：v1.0
date：2020.3
Author：01Studio
Description: make the continuous rotating servo rotate at different speeds.
Forum: forum.01studio.org
'''

from gpiozero import Servo
from time import sleep

#SG90 360' Servo
servo = Servo(20)

while True:

    #Spin at different speeds
    servo.value = -1.0
    sleep(2)

    servo.value = -0.5
    sleep(2)

    servo.value = None #stop
    sleep(2)

    servo.value = 0.5
    sleep(2)

    servo.value = 1.0
    sleep(2)
