led.py
from gpiozero import LED from time import sleep led = LED(17) while True: print "start cycle" led.on() sleep(1) led.off() sleep(1)
button_led.py
from gpiozero import LED, Button from signal import pause led = LED(17) button = Button(2) button.when_pressed = led.on button.when_released = led.off pause()
Smartkeke