Skip to content

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

Open
@zandam-xrn

Description

@zandam-xrn

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions