fixed some things and tried to convert it into str

main
thunic 3 years ago
parent 75b53350c2
commit 8c1f352fbd

@ -33,7 +33,7 @@ def add_sensordata():
now = datetime.now()
timestamp = {"timestamp":now}
timestamp = {"timestamp":str(now)}
sensordata.update(timestamp)

@ -89,9 +89,9 @@ void loop() {
DynamicJsonDocument doc(2048);
// Add values in the document
doc["temperature"] = temperature;
doc["moisture"] = moisture;
doc["humidity"] = humidity;
doc["temperature"] = String(temperature);
doc["moisture"] = String(moisture);
doc["humidity"] = String(humidity);
String requestBody;
serializeJson(doc, requestBody);

Loading…
Cancel
Save