Update 'DHT11toMYSQL.ino'
This commit is contained in:
@@ -39,10 +39,9 @@ void setup() {
|
||||
void loop(){
|
||||
// 30sec measurement interval
|
||||
delay(30000);
|
||||
|
||||
float h = dht.readHumidity();
|
||||
float t = dht.readTemperature();
|
||||
|
||||
// Prepare measurement values as query string
|
||||
String queryString = String("?humidity=") + String(h) + String("&temperature=") + String(t);
|
||||
|
||||
if (client.connect(server, 80)) {
|
||||
@@ -58,7 +57,6 @@ client.println("Connection: close");
|
||||
client.println(); // end HTTP request header
|
||||
//send HTTP body
|
||||
client.println(queryString);
|
||||
|
||||
while(client.available())
|
||||
{
|
||||
// read an incoming byte from the server and print them to serial monitor:
|
||||
|
||||
Reference in New Issue
Block a user