rjdekker / MHI2MQTT

Arduino-based WiFi/MQTT controller for wireless operation of a Mitsubishi Heavy Industries air conditioner through its serial CNS port
MIT License
134 stars 27 forks source link

DynamicJSONBuffer not longer supported in Arduino 6 #13

Closed manoloxxl closed 4 years ago

manoloxxl commented 4 years ago

Hi,

when i try to verify / compile the MHI-ESP2MQTT there is shown an error:

MHI-ESP2MQTT:132:11: error: DynamicJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6 DynamicJsonBuffer jsonBuffer; ^ MHI-ESP2MQTT:308:11: error: DynamicJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6 DynamicJsonBuffer jsonBuffer; ^ exit status 1 DynamicJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

How must i change the both lines where it is used? I tried "DynamicJsonDocument jsonBuffer(1024);" but then it's running into next errors. Or is there a way to tell the Arduino IDE to use v5 instead of v6?

Best Regards and thanks for that great work

Manuel

manoloxxl commented 4 years ago

Okay, got it :) Just change it in the Liubrary manager: https://arduinojson.org/v5/doc/installation/