Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created December 13, 2013 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trobrock/7951226 to your computer and use it in GitHub Desktop.
Save trobrock/7951226 to your computer and use it in GitHub Desktop.
int LED = D7;
char msg[] = "Uhh hello";
#include <string.h>
TCPClient client;
void setup()
{
pinMode(LED, OUTPUT);
delay(1000);
client.connect("requestb.in", 80);
client.println("POST /19omoa81 HTTP/1.0");
client.println("Host: requestb.in");
client.print("Content-Length: ");
client.println(strlen(msg)+7);
client.println();
client.print("status=");
client.println(msg);
}
void loop() {
digitalWrite(LED, HIGH);
delay(250);
digitalWrite(LED, LOW);
delay(250);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment