Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

Hello,

I have a Wemos D1 mini and a mpu 6060. Im trying to send a value to my firebase DB but compiling keeps getting terminated saying its not the right board. How can i fix this?

"C:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0/tools/sdk/include" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0/tools/sdk/lwip2/include" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\Zakaria\\AppData\\Local\\Temp\\arduino_build_403203/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10812 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0\\cores\\esp8266" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0\\variants\\d1_mini" "-IC:\\Users\\Zakaria\\Documents\\Arduino\\libraries\\FirebaseJson\\src" "-IC:\\Users\\Zakaria\\Documents\\Arduino\\libraries\\firebase-arduino-master\\src" "-IC:\\Users\\Zakaria\\Documents\\Arduino\\libraries\\ArduinoJson\\src" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0\\libraries\\ESP8266HTTPClient\\src" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\Zakaria\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.0\\libraries\\Wire" "C:\\Users\\Zakaria\\AppData\\Local\\Temp\\arduino_build_403203\\sketch\\WORKING_ACCELERAMETOR_BACKUP.ino.cpp" -o "C:\\Users\\Zakaria\\AppData\\Local\\Temp\\arduino_build_403203\\preproc\\ctags_target_for_gcc_minus_e.cpp"
In file included from C:\Users\Zakaria\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:30:0,

                 from C:\Users\Zakaria\Desktop\WORKING_ACCELERAMETOR_BACKUP\WORKING_ACCELERAMETOR_BACKUP.ino:4:

C:\Users\Zakaria\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

     std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

           ^

In file included from C:\Users\Zakaria\Desktop\WORKING_ACCELERAMETOR_BACKUP\WORKING_ACCELERAMETOR_BACKUP.ino:4:0:

C:\Users\Zakaria\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

   std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

           ^

Using library FirebaseJson at version 2.3.3 in folder: C:\Users\Zakaria\Documents\Arduino\libraries\FirebaseJson 
Using library firebase-arduino-master at version 0.1 in folder: C:\Users\Zakaria\Documents\Arduino\libraries\firebase-arduino-master 
Using library ArduinoJson at version 6.15.0 in folder: C:\Users\Zakaria\Documents\Arduino\libraries\ArduinoJson 
Using library ESP8266HTTPClient at version 1.2 in folder: C:\Users\Zakaria\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266HTTPClient 
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Zakaria\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266WiFi 
Using library Wire at version 1.0 in folder: C:\Users\Zakaria\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\Wire 
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

The error is not about board.. This is the problem

Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

Google how to resolve that maybe?

This error means you're using a version of ArduinoJson library that is not compatible with this code. The ArduinoJson library 6.x.x versions have breaking changes that make them not work with code written for the ArduinoJson 5.x.x versions.

The recommended solution is to roll back to the newest 5.x.x release of ArduinoJson:

  • Sketch > Include Library > Manage Libraries...
  • Wait for the download to finish.
  • In the "Filter your search..." box, type "arduinojson".
  • In the search results, click on "ArduinoJson by Benoit Blanchon"
  • From the dropdown version menu, select "5.13.5".
  • Click "Install".
  • Wait for the installation to finish.
  • Click "Close'. The code should now compile.

The alternative solution is to update the code to work with the 6.x.x versions of ArduinoJson. You will find a guide to this here:

Reference: