Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What the role of the function nexInit() is? #74

Open
zandam-xrn opened this issue May 8, 2019 · 1 comment
Open

What the role of the function nexInit() is? #74

zandam-xrn opened this issue May 8, 2019 · 1 comment

Comments

@zandam-xrn
Copy link

Hello, I'm using your library on an esp32 and I'm doing some tests with a Nextion display.
I noticed that in each example the communication is initialized with nexInit(); line of code.
I dug in the library and that function basically sends to the display, using the serial communication, some commands.

bool nexInit(void)
{
    bool ret1 = false;
    bool ret2 = false;
    
    dbSerialBegin(9600);
    nexSerial.begin(9600);
    sendCommand("");
    sendCommand("bkcmd=1");
    ret1 = recvRetCommandFinished();
    sendCommand("page 0");
    ret2 = recvRetCommandFinished();
    return ret1 && ret2;
}

In my case this function gave me some error so I tried to remove that loc.
Unexpectedly the display was still able to boot and to communicate with my esp32.

So my questions are: is initialize the display important? Why does everything work the same without it? Can there be problems not sending those commands (bkcmd=1 and page0)?

@danger21th
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants