Serial Connection C++

agustin.dubatti
Posts: 2
Joined: Thu Feb 21, 2019 3:52 pm

Serial Connection C++

Postby agustin.dubatti » Thu Feb 21, 2019 3:59 pm

Hi!

I am working on the ESP32 in C++ with the esp-idf on Linux. I need two serial communications. One with 115200 bauds and another with 9600.

I tried with the ESP32_SerialPort.h but I can't change the bauds and the UART initializes by default.

Thanks.
Last edited by agustin.dubatti on Fri Feb 22, 2019 1:01 pm, edited 1 time in total.

ESP_cermak
Posts: 69
Joined: Thu Nov 01, 2018 8:32 am

Re: Serial Connection C++

Postby ESP_cermak » Fri Feb 22, 2019 6:51 am

Hi augustin,

which API of ESP-IDF are you using? Please see the documentation to configure UART parameter here https://docs.espressif.com/projects/esp ... parameters.
You can call `uart_set_baudrate()`from C++, too

It doesn't seem ESP32_SerialPort.h comes from esp-idf, nor from Arduino?

agustin.dubatti
Posts: 2
Joined: Thu Feb 21, 2019 3:52 pm

Re: Serial Connection C++

Postby agustin.dubatti » Tue Feb 26, 2019 3:02 pm

Hi! I read the doc and it works. I was using a library given by the fabricant of my device.


Thank you!!

Who is online

Users browsing this forum: Baidu [Spider] and 144 guests