Created
August 7, 2012 20:26
-
-
Save jonmarkgo/3289015 to your computer and use it in GitHub Desktop.
poweroutlet4
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
//paste powerSwitch function here | |
void powerSwitch(String data) { | |
String cmd = client.parseMessageMember("command", data); | |
wifiSerial.print("Command: "); | |
wifiSerial.println(cmd); | |
if (cmd == "on") { | |
digitalWrite(poweroutlet,HIGH); | |
} | |
else { | |
digitalWrite(poweroutlet,LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment