Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gpiozero import OutputDevice
- # setup PIN as output
- gpio_pin = OutputDevice(18, initial_value=True)
- # change GPIO status
- gpio_pin.toggle()
- # wait 40 seconds
- time.sleep(40)
- # change GPIO status to stop the movement
- gpio_pin.toggle()
- # close the pin, clear the status
- gpio_pin.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement