烧录代码时提示错误-Arduino中文社区 - Powered by Discuz! Archiver

Mihelle42 发表于 2018-7-25 05:10

烧录代码时提示错误

用arduino烧录“单片机菜鸟”的代码提示这个什么意思:
:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (3M SPIFFS)"C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino: In function 'bool parseUserData(char*, UserData*)':sketch_jul25d:219: error: 'DynamicJsonBuffer' was not declared in this scope   DynamicJsonBuffer jsonBuffer;   ^C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino:219:3: note: suggested alternative:In file included from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/DynamicJsonDocument.hpp:10:0,               from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:9,               from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,               from C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino:8:C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/DynamicJsonBuffer.hpp:159:5: note:   'ArduinoJson::Internals::DynamicJsonBuffer'   DynamicJsonBuffer;   ^sketch_jul25d:219: error: expected ';' before 'jsonBuffer'   DynamicJsonBuffer jsonBuffer;                     ^sketch_jul25d:221: error: 'jsonBuffer' was not declared in this scope   JsonObject& root = jsonBuffer.parseObject(content);                      ^sketch_jul25d:223: error: 'class ArduinoJson::JsonObject' has no member named 'success'   if (!root.success()) {             ^C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino: In function 'void sendtoArduino(const UserData*)':sketch_jul25d:240: error: 'StaticJsonBuffer' was not declared in this scope   StaticJsonBuffer<300> jsonBuffer;   ^C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino:240:3: note: suggested alternative:In file included from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/StaticJsonDocument.hpp:8:0,               from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:10,               from C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,               from C:\Users\Michelle\AppData\Local\Temp\arduino_modified_sketch_592505\sketch_jul25d.ino:8:C:\Users\Michelle\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note:   'ArduinoJson::Internals::StaticJsonBuffer' class StaticJsonBuffer : public Internals::StaticJsonBufferBase {       ^sketch_jul25d:240: error: 'jsonBuffer' was not declared in this scope   StaticJsonBuffer<300> jsonBuffer;                         ^sketch_jul25d:249: error: 'class ArduinoJson::JsonObject' has no member named 'printTo'   root.printTo(Serial);//单行打印      ^exit status 1'DynamicJsonBuffer' was not declared in this scope在文件 -> 首选项开启“编译过程中显示详细输出”选项这份报告会包含更多信息。
怎么解决呢

奈何col 发表于 2018-7-25 09:03

库用错了,或者库版本不对
页: [1]
查看完整版本: 烧录代码时提示错误