gpt4 book ai didi

c++ - 编译Arduino代码(NodeMCU)时出错

转载 作者:行者123 更新时间:2023-12-02 10:56:36 26 4
gpt4 key购买 nike

我已经使用NodeMCU了1周,但是昨天突然间,像往常一样再次编译NodeMCU时,它在编译期间显示错误,并且没有上传代码。请帮助我摆脱困境。

这是即将到来的错误

Arduino: 1.8.12 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkApiArduino.h:14:0,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkSimpleEsp8266.h:24,

from C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:3:

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h: In instantiation of 'void BlynkApi<Proto>::syncVirtual(Args ...) [with Args = {}; Proto = BlynkProtocol<BlynkArduinoClientGen<Client> >]':

C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:69:25: required from here

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:143:9: error: no matching function for call to 'BlynkParam::add_multi()'

cmd.add_multi(pins...);

^

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:143:9: note: candidates are:

In file included from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:16:0,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkApiArduino.h:14,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkSimpleEsp8266.h:24,

from C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:3:

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkParam.h:111:10: note: template<class T, class ... Args> void BlynkParam::add_multi(T)

void add_multi(T last) {

^

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkParam.h:111:10: note: template argument deduction/substitution failed:

In file included from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkApiArduino.h:14:0,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkSimpleEsp8266.h:24,

from C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:3:

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:143:9: note: candidate expects 1 argument, 0 provided

cmd.add_multi(pins...);

^

In file included from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:16:0,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkApiArduino.h:14,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkSimpleEsp8266.h:24,

from C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:3:

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkParam.h:116:10: note: template<class T, class ... Args> void BlynkParam::add_multi(T, Args ...)

void add_multi(T head, Args... tail) {

^

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkParam.h:116:10: note: template argument deduction/substitution failed:

In file included from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkApiArduino.h:14:0,

from C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/BlynkSimpleEsp8266.h:24,

from C:\Users\Govind\Desktop\Stepper_Motor_Joystick_2.21\Stepper_Motor_Joystick_2.21.ino:3:

C:\Users\Govind\Documents\Arduino\libraries\arduino_238892\src/Blynk/BlynkApi.h:143:9: note: candidate expects 2 arguments, 0 provided

cmd.add_multi(pins...);

^

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

我目前正在尝试使用 AccelStepper 库和 Blynk 库运行步进电机,并且还包括 Esp8266 库以进行连接。我无法理解问题

最佳答案

看起来像没有任何参数的Blynk.syncVirtual()一样。您需要至少包含一个虚拟引脚,如下所示:

  Blynk.syncVirtual(V4);

关于c++ - 编译Arduino代码(NodeMCU)时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62125995/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com