Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created August 7, 2012 20:26
Show Gist options
  • Save jonmarkgo/3289015 to your computer and use it in GitHub Desktop.
Save jonmarkgo/3289015 to your computer and use it in GitHub Desktop.
poweroutlet4
//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