Skip to content

Instantly share code, notes, and snippets.

@pintman

pintman/PWM Secret

Created August 6, 2016 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pintman/30011f7602cbe59c138f2325560a54a2 to your computer and use it in GitHub Desktop.
Save pintman/30011f7602cbe59c138f2325560a54a2 to your computer and use it in GitHub Desktop.
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(33, GPIO.OUT) # red LED
p = GPIO.PWM(33, 50) # channel=33 frequency=50Hz
p.start(80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment