Last active
August 31, 2016 04:35
-
-
Save chdsbd/692f9fc39b0f58ff27f35e775dfed7fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(13, GPIO.OUT) | |
p = GPIO.PWM(13, 50) | |
p.start(7) | |
print "STARTED" | |
for i in range(0, 11): | |
print "PWM duty cycle of: ", i | |
p.ChangeDutyCycle(i) | |
nextdc = i + 1 | |
raw_input("Hit return to go to next DC of {}".format(nextdc)) | |
p.stop() | |
GPIO.cleanup() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment