Esp32 DoIt Dev Kit v1 - Serial2 not working ?

tweety
Posts: 1
Joined: Mon Apr 27, 2020 6:00 pm

Esp32 DoIt Dev Kit v1 - Serial2 not working ?

Postby tweety » Mon Apr 27, 2020 6:10 pm

Hello,

I have a Esp32 Doit Dev kit v1.
I'm using Visual Studio Code with PlatformIO.

I'm trying to use a Nextion lcd.

My code is

Code: Select all

#include <HardwareSerial.h>

// HardwareSerial NextionSerial(0);
HardwareSerial NextionSerial(2);

void setup() {

    // NextionSerial.begin(115200, SERIAL_8N1, 3, 1);
    NextionSerial.begin(115200, SERIAL_8N1, 19, 18);

    NextionSerial.print("page boot");
    NextionSerial.print("\xFF\xFF\xFF");
    delay(10);

    NextionSerial.print("page boot");
    NextionSerial.print("\xFF\xFF\xFF");

    delay(500);

    NextionSerial.print("page nextion");
    NextionSerial.print("\xFF\xFF\xFF");

    delay(2000);

    NextionSerial.print("page main");
    NextionSerial.print("\xFF\xFF\xFF");
}

void loop() {
    delay(2000);
}
With my ldc connected to pins 18 and 19. And ... it is nor working.
If I'm using HardwareSerial 0 with lcd on pins (1 and 3), it's working.
What's the problem ?
I thought the board had 3 uart serials.

Who is online

Users browsing this forum: No registered users and 78 guests