Last active
March 9, 2017 16:05
-
-
Save bphermansson/69b24cfcbba7c84cf2e015b1f131c6a8 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
#!/usr/bin/env python | |
import pigpio | |
from time import sleep | |
pi = pigpio.pi() | |
# Leds on Gpio 13, 19, 26 | |
while 1: | |
# On Broadcom Gpio12 (physical pin 32) we have a analog gauge | |
pi.hardware_PWM(12, 2000, 250000) | |
pi.write(13, 1) | |
sleep(1) | |
pi.write(13, 0) | |
pi.hardware_PWM(12, 2000, 500000) | |
pi.write(19, 1) | |
sleep(1) | |
pi.write(19, 0) | |
pi.hardware_PWM(12, 2000, 750000) | |
pi.write(26, 1) | |
sleep(1) | |
pi.write(26, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment