Last active
April 3, 2017 17:22
-
-
Save pudelosha/e806ae6001ef62df78242703573f1feb to your computer and use it in GitHub Desktop.
kaka.ino
This file contains 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
#include <Wire.h> | |
#include <UnoWiFiDevEd.h> | |
#include <DHT.h> | |
DHT dht(DHT11, 0); | |
void setup() { | |
Serial.begin(9600); | |
dht.begin(); | |
Wifi.begin(); | |
} | |
void loop() { | |
while(Wifi.available()){ | |
Serial.println("WiFi available, postin data"); | |
PostResults(Wifi); | |
} | |
delay(5000); | |
} | |
void PostResults(WifiData client) { | |
String data; | |
data = "humidity=10&temperature=20&moisture=30"; | |
Serial.println("connected"); | |
client.println("GET / HTTP/1.1"); | |
client.println("Host: www.officetools4u.com"); | |
client.println("Connection: close"); | |
client.println(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment