Skip to content

Instantly share code, notes, and snippets.

/Test Secret

Created November 25, 2017 19:54
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 anonymous/3abeb0cdb282ea2da835baa6c299a0bf to your computer and use it in GitHub Desktop.
Save anonymous/3abeb0cdb282ea2da835baa6c299a0bf to your computer and use it in GitHub Desktop.
import pifacedigitalio as p
from time import sleep
p.init()
if(p.digital_read(0)):
p.digital_write(0,1) #turn on
sleep(1)
p.digital_write(0,0) #turn off
sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment