Skip to content

Instantly share code, notes, and snippets.

@vestige
Last active May 31, 2020 06:34
Show Gist options
  • Save vestige/34124692ffe8c31429b7abf8c50c8a39 to your computer and use it in GitHub Desktop.
Save vestige/34124692ffe8c31429b7abf8c50c8a39 to your computer and use it in GitHub Desktop.
pwm.py
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.OUT)
pwm = GPIO.PWM(16, 100)
pwm.start(5)
while True:
sleep(0.1)
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment