This repository was archived by the owner on Jun 7, 2025. It is now read-only.

Description
compiling ha_mqtt_sensor_dht22.ino lately gives an error saying the code needs to be migrated from ArduinoJson 5 to ArduinoJson 6.
the following link to a website is given, and i could solve the topic by watching just the video at second example given, see https://arduinojson.org/v6/doc/upgrade/
In short:
- change 'StaticJsonBuffer' to 'StaticJsonDocument' to become > StaticJsonDocument<200> doc;
- remove line > JsonObject& root = jsonBuffer.createObject();
- replace the 'root' object with 'doc' subsequently
- replace root.prettyPrintTo(Serial); with serializeJsonPretty(doc, Serial);
- replace root.printTo(data, root.measureLength() + 1); with serializeJson(doc, data);
(this latest line i don't understand why the measureLenght paramter can be omitted, but seems to work)