diff --git a/arduino/sensor combo/combi/combi.ino b/arduino/sensor combo/combi/combi.ino index eb0cbc9..5090188 100644 --- a/arduino/sensor combo/combi/combi.ino +++ b/arduino/sensor combo/combi/combi.ino @@ -1,3 +1,6 @@ +#include +#include + //de library van de tempratuur en vochtisheid sensor er bij pakken. //moet je instaleren via linker tabje moet boeken en dan dht11 op te zoeke n in het zoek veld en daarna de dht11 extensie te installeren #include @@ -54,17 +57,10 @@ void loop() { float Lichtsterkte = analogRead(LDR); //hier worden alle variabelen in de serial monitor uitgespuugt, en websites kunnen ook de Serial.print lezen. - Serial.println("----------"); - - Serial.print("Temparatuur celcius: "); - Serial.println(Temparatuur); - - Serial.print("vochtigheid: "); - Serial.println(Luchtvochtigheid); - - Serial.print("LDR reading: "); - Serial.println(Lichtsterkte); + String JsArray = String("[") + Temparatuur + "," + Luchtvochtigheid + "," + Lichtsterkte +"]/n"; + Serial.print(JsArray); + @@ -75,9 +71,6 @@ void loop() { String httpRequestData = "type=temperature&value=" + String(Temparatuur); //stuur de post request naar de server toe int httpResponseCode = http.POST(httpRequestData); - //print de response code naar - Serial.print("HTTP Response code:"); - Serial.println(httpResponseCode); //wacht x aanal miliseconden digitalWrite(5, HIGH); delay(400);