查看: 1576|回复: 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在文件 -> 首选项开启“编译过程中显示详细输出”选项这份报告会包含更多信息。
怎么解决呢
  • TA的每日心情
    郁闷
    2018-12-6 22:21
  • 签到天数: 48 天

    [LV.5]常住居民I

    发表于 2018-7-25 09:03 | 显示全部楼层
    库用错了,或者库版本不对
    您需要登录后才可以回帖 登录 | 立即注册  

    本版积分规则

    热门推荐

    Blynk与m5stack basic以及uiflow的交互玩法
    Blynk与m5stack basic以及
    Blynk与m5stack basic以及uiflow的交互玩法 [准备工作我们假设玩家已经熟悉下面的准备
    求助oled显示屏 中间有一条不显示 折腾好久没明白是咋回事
    求助oled显示屏 中间有一
    以下是源代码,课程做东西需要,卡在了这一环节,求大神指教(跪 #include #i
    中文 字库 的8针 OLED 12864模块 arduino
    中文 字库 的8针 OLED 128
    屏幕电路SPI连线: 中文字库OLED Arduino UNO GND GND
    DIY X-Y 平面激光器
    DIY X-Y 平面激光器
    DIY X-Y 平面激光器 总成本不到50元,性能一点不比市面的差. Arduino UNO x1 舵机 x2
    【干货分享】mega2560原理图PCB图纸altium designer18
    【干货分享】mega2560原理
    分享一下mega2560的板子 AD版本 **** 本内容被作者隐藏 **** ergo
    Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
    快速回复 返回顶部 返回列表