[在此处输入图片描述] [1]
当我尝试将经过验证的代码上传到mega 2560 arduino时出现此错误。
我想将Nextion HMI与arduino mega 2560连接起来。
#include <Nextion.h>
#include <NextionPage.h>
#include <NextionButton.h>
#include <SoftwareSerial.h>
SoftwareSerial HMISerial(10, 11);
Nextion nex(HMISerial);
NextionPage pgButton(nex, 0, 0, "pgButton");
NextionButton button(nex, 0, 1, "bEgButton");
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
nextionSerial.begin(9600);
//nex.init();
[1]: https://i.stack.imgur.com/DwcQJ.png