Skip to content

Instantly share code, notes, and snippets.

@pikesley
Created September 23, 2016 12:19
Show Gist options
  • Save pikesley/567037a2a12e2c459cd85bffc5f20b4a to your computer and use it in GitHub Desktop.
Save pikesley/567037a2a12e2c459cd85bffc5f20b4a to your computer and use it in GitHub Desktop.
How do I Pi?

Before you begin

sudo easy_install gpiozero

The script

from gpiozero import LED
from time import sleep

yellow = LED(17)
red = LED(27)
green = LED(22)

lamps = [yellow, red, green]

while True:
  for lamp in lamps:
    lamp.on()
    sleep(0.1)
    lamp.off()
    sleep(0.1)

The Treasure Map

http://pinout.xyz/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment