You are here

Issues with UART Connection: VESC 6.05 and ESP32 Display

1 post / 0 new
PHNTM
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2024-07-16 09:45
Posts: 1
Issues with UART Connection: VESC 6.05 and ESP32 Display
#define Tx1 27
#define Rx1 22
// Initialize UART1 (Serial1) on custom pins (for example GPIO 27 as Tx and GPIO 22 as Rx)

Serial2.begin(115200, SERIAL_8N1, Rx1, Tx1);
Serial.begin(115200); // comms for debug
Serial2.begin(115200); // Setup UART port (FOR VESC) pins rx2 and tx2
UART.setSerialPort(&Serial2);

Hello,

I’m having trouble and need your help. I want to connect a DIY display to my Ubox85150 with VESC 6.05.

Bluetooth is connected to the NRF port, and it works perfectly. For the display, I used 5V, GND, RX, and TX from the comm port.

The display is a CYD (Cheap Yellow Display, ESP32-24323S028):
https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display

Since my own sketch did not receive any data, I used the code from the following project as a basis:
https://github.com/Gh0513d/SVD

The necessary libraries are included, and the TFT_eSPI library is configured correctly for my display. The display itself works, but no data is coming from the VESC.

The baud rate is set to 115200 in both the code and the VESC. In the VESC settings, I have activated "ADC and UART" under App Configuration.

I have checked the wiring—RX is connected to TX and TX to RX.

Additionally, I connected an FTDI USB-to-UART converter to the ESC to check if data is being sent from the controller.

Using CoolTerm, I checked if data is arriving. The output in CoolTerm changes when I apply gas on the scooter; however, I cannot interpret the data. At least it shows me that something is being sent.

When I connect RX to TX and TX to RX, I only get zeros (00 00 00 00 ...).
When I connect TX to TX and RX to RX, I receive the following output:

00 08 00 00 00 08 00 00 00 00 00 0A 00 00 00 02 00 00 00 0A 00 08 00 00 08 00 08 00 00 00 00 00 00 08 00 08 00 ...

Unfortunately, my programming skills are not sufficient, and I am now stuck. I don’t understand where the error could be.

Have I overlooked something? Do I need to make any other settings?

I have slightly modified the code to specify the UART connection:

Despite these adjustments, I am still not receiving any data on the display.

Do you have any ideas on what I might have overlooked? I would be very grateful for your support!

 

 

Done! The line made it work

Serial2.begin(115200, SERIAL_8N1, 1, 3);
// Serial.begin(115200); // comms for debug
// Serial2.begin(115200);/** Setup UART port (FOR VESC) pins rx2 and tx2 */
UART.setSerialPort(&Serial2);