Skip to content

Instantly share code, notes, and snippets.

@bphermansson
Last active March 9, 2017 16:05
Show Gist options
  • Save bphermansson/69b24cfcbba7c84cf2e015b1f131c6a8 to your computer and use it in GitHub Desktop.
Save bphermansson/69b24cfcbba7c84cf2e015b1f131c6a8 to your computer and use it in GitHub Desktop.
#!/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