Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created June 18, 2012 17:38
Show Gist options
  • Save jonmarkgo/2949602 to your computer and use it in GitHub Desktop.
Save jonmarkgo/2949602 to your computer and use it in GitHub Desktop.
WiFly Loop
void loop()
{
//turn on the LED if the TCP socket is open
if (client.connected()) {
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(ledPin, LOW);
}
//check for incoming data over TCP
if (client.available()) {
char c = client.read();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment