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

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4147|回复: 1

烧录代码时提示错误

[复制链接]
发表于 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:ynamicJsonBuffer'     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在文件 -> 首选项开启“编译过程中显示详细输出”选项这份报告会包含更多信息。
怎么解决呢
发表于 2018-7-25 09:03 | 显示全部楼层
库用错了,或者库版本不对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 14:42 , Processed in 0.092849 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表