Last active
September 17, 2015 21:24
-
-
Save dpjanes/2f4cebe6a6d7aaa14ede to your computer and use it in GitHub Desktop.
IOTQL Example - Turn on LED when Button Pressed
This file contains 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
CREATE THING JohnnyFiveButton WITH pin = 4, meta:name = "The Button"; | |
CREATE THING JohnnyFiveLED WITH pin = 6, meta:name = "The LED"; | |
CREATE RULE | |
LED | |
WHERE | |
meta:name = "The Button" | |
BEGIN | |
SET | |
state:on = $_$state:on | |
WHERE | |
meta:name = "The LED" | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment