LilyGO / TTGO-T4-DEMO

47 stars 15 forks source link

DynamicJsonBuffer jsonBuffer(bufferSize); #5

Open thetuxcat opened 5 years ago

thetuxcat commented 5 years ago

It dosent work, DynamicJsonBuffer jsonBuffer(bufferSize);

thetuxcat commented 5 years ago

Arduino: 1.8.7 (Windows 10), Board: "TTGO LoRa32-OLED V1, 80MHz, 921600, None"

C:\Users\thetu\Documents\Arduino\sketch_dec04b\sketch_dec04b.ino: In function 'void loop()':

sketch_dec04b:177:1: error: 'DynamicJsonBuffer' was not declared in this scope

DynamicJsonBuffer jsonBuffer(bufferSize);

^

sketch_dec04b:179:20: error: 'jsonBuffer' was not declared in this scope

JsonObject& root = jsonBuffer.parseObject(buffer);

                ^

sketch_dec04b:181:11: error: 'class ArduinoJson660_0_0::JsonObject' has no member named 'success'

if (!root.success()) {

       ^

Multiple libraries were found for "SPI.h" Used: C:\Users\thetu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\SPI Not used: C:\Users\thetu\Documents\Arduino\libraries\SPI Multiple libraries were found for "WiFi.h" Used: C:\Users\thetu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WiFi Not used: C:\Program Files (x86)\Arduino\libraries\WiFi Multiple libraries were found for "WiFiClientSecure.h" Used: C:\Users\thetu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WiFiClientSecure Not used: C:\Users\thetu\Documents\Arduino\libraries\ESP8266WiFi exit status 1 'DynamicJsonBuffer' was not declared in this scope

per1234 commented 5 years ago

This error is caused by using a version of the ArduinoJson library that is not compatible with this library. The solution is to roll back to the newest compatible version of ArduinoJson:

  1. Sketch > Include Library > Manage Libraries...
  2. Wait for download to finish.
  3. In the "Filter your search..." box, type: arduinojson
  4. Click on "ArduinoJson by Benoit Blanchon.
  5. From the dropdown version menu, select "Version 5.13.4"
  6. Click "Update".
  7. Wait for the update to finish.
  8. Click "Close".

After that, the code should compile.

More information, as well as a guide to updating the library to the ArduinoJson 6.x.x API:

thetuxcat commented 5 years ago

Thank you, got past that, but will not compile to any boards listed. It see the boards and has port, but no compile.

Sent from Mail for Windows 10

From: per1234 Sent: Tuesday, December 4, 2018 5:24 PM To: LilyGO/TTGO-T4-DEMO Cc: thetuxcat; Author Subject: Re: [LilyGO/TTGO-T4-DEMO] DynamicJsonBuffer jsonBuffer(bufferSize);(#5)

This error is caused by using a version of the ArduinoJson library that is not compatible with this library. The solution is to roll back to the newest compatible version of ArduinoJson:

  1. Sketch > Include Library > Manage Libraries...
  2. Wait for download to finish.
  3. In the "Filter your search..." box, type: arduinojson
  4. Click on "ArduinoJson by Benoit Blanchon.
  5. From the dropdown version menu, select "Version 5.13.4"
  6. Click "Update".
  7. Wait for the update to finish.
  8. Click "Close". After that, the code should compile. More information, as well as a guide to updating the library to the ArduinoJson 6.x.x API: • https://arduinojson.org/v5/faq/error-jsonbuffer-was-not-declared-in-this-scope/https://arduinojson.org/v6/doc/upgrade/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.