Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created August 30, 2020 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/de444e6b7ebf80dccb9adfa73c37a22b to your computer and use it in GitHub Desktop.
Save JeffersGlass/de444e6b7ebf80dccb9adfa73c37a22b to your computer and use it in GitHub Desktop.
from gpiozero import LED, Button
redLed = LED(20)
yellowLed = LED(21)
myButton = Button(16)
while(True):
if myButton.is_pressed:
redLed.off()
yellowLed.on()
else:
redLed.on()
yellowLed.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment