Created
December 13, 2013 20:57
-
-
Save trobrock/7951226 to your computer and use it in GitHub Desktop.
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
int LED = D7; | |
void setup() { | |
pinMode(LED, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(LED, HIGH); | |
delay(250); | |
digitalWrite(LED, LOW); | |
delay(250); | |
} |
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
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