Created
July 7, 2014 18:40
-
-
Save ersatzavian/4b008336d6544c0c506c to your computer and use it in GitHub Desktop.
Blink LED on imp001 pin 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Device Code | |
| led <- hardware.pin1; | |
| led.configure(DIGITAL_OUT); | |
| state <- 0; | |
| function loop(){ | |
| server.log("Blink: "+state); | |
| led.write(state); | |
| state = 1 - state; | |
| imp.wakeup(1, loop); | |
| } | |
| loop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment