Skip to content

Instantly share code, notes, and snippets.

@thisMagpie
Created November 20, 2015 16:39
Show Gist options
  • Save thisMagpie/95b40c32e1471be88a64 to your computer and use it in GitHub Desktop.
Save thisMagpie/95b40c32e1471be88a64 to your computer and use it in GitHub Desktop.
import webiopi
GPIO = webiopi.GPIO # Assign GPIO object
LED0 = 24 # Set GPIO Pin to 24
GPIO.setFunction(LED0, GPIO.OUT) # Set GPIO Pin to OUT
GPIO.digitalWrite(LED0, GPIO.HIGH) # Turn on LED
webiopi.sleep(2) # Wait 2 seconds
GPIO.digitalWrite(LED0, GPIO.LOW) # Turn off LED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment