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
/** | |
* App Endpoint API Access Example | |
* | |
* Author: SmartThings | |
*/ | |
preferences { | |
section("Allow Endpoint to Control These Things...") { | |
input "switches", "capability.switch", title: "Which Switches?", multiple: true | |
input "locks", "capability.lock", title: "Which Locks?", multiple: true |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
imp.configure("Roomba", [], []); | |
hardware.pin1.configure(DIGITAL_IN_WAKEUP); | |
hardware.pin2.configure(DIGITAL_OUT_OD_PULLUP); | |
impWakeupPin <- hardware.pin1; | |
roombaWakeupPin <- hardware.pin2; | |
roombaWakeupPin.write(1); | |
hardware.uart57.configure(115200, 8, PARITY_NONE, 1, NO_CTSRTS); | |
//Connection will be either 115200 or 57600 |
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
// Tutorial 3: T1 & T2 combined Electric imp April inputs & outputs from JQM web app | |
//Imp & Agent are written in squirrel-lang.org They should have a .NUT extension. | |
//but I've used .js so the editor will use colour highlighting. |
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
//Tutorial 1 Reading Electric imp April input from JQM web app | |
//Imp & Agent are written in squirrel-lang.org They should have a .NUT extension. | |
//but I've used .js so the editor will use colour highlighting. |
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
// Tutorial 2 setting Electric imp April outputs from JQM web app | |
//Imp & Agent are written in squirrel-lang.org They should have a .NUT extension. | |
//but I've used .js so the editor will use colour highlighting. |