gfurtadoalmeida / esp32-driver-nextion

ESP32 driver for Nextion displays.
MIT License
17 stars 7 forks source link

Nextion: failed initializing display #4

Closed oswatt55 closed 2 years ago

oswatt55 commented 2 years ago

i got the issue below, can you help me? My project is in eclipse, I´m using nextion NX4832T035_011. In your exemple i get this In the terminal terminal in the code of nextion.c nextion_init

gfurtadoalmeida commented 2 years ago

Sure! Could you please tell:

oswatt55 commented 2 years ago

Thanks. My baud rate is 115200. I´m using the exemple Not, i have only used your library

gfurtadoalmeida commented 2 years ago

Ok. I'll take a look at that after work. Unfortunately, I don't have a Nextion device anymore, so will test with the simulator, using your NX4832T035_011.

oswatt55 commented 2 years ago

Thank you very much.

oswatt55 commented 2 years ago

It already works, I needed to specify in the nextion editor the baud rate baude=115200, but now I have these errors, I'll keep checking the causes nextion_init

gfurtadoalmeida commented 2 years ago

Nice! The Installation Wiki was updated with this information. What really need be done, in the future, is the implementation of an automatic baud rate detection.

I can't reproduce the sync error error. I've just cloned the repo, copied the example code to main.c and flashed/ran. Everything worked fine.

What values are being set on CONFIG_NEX_UART_* params? The CONFIG_NEX_UART_MUTEX_WAIT_TIME_MS parameter is used as a timeout when trying to acquire a mutex. A very low value could cause this problem.

What is your ESP-IDF version?

oswatt55 commented 2 years ago

My params in the file config.h Captura ESP-IDF version 4.3

gfurtadoalmeida commented 2 years ago

Could you clone it again, copy the example code to main.c, flash and run? I've tried again but could not reproduce the problem.

oswatt55 commented 2 years ago

okey, It already works, thanks Gabriel

gfurtadoalmeida commented 2 years ago

Nice! What was the problem?

oswatt55 commented 2 years ago

my code had errors. I came back again with your example and it works correctly

oswatt55 commented 2 years ago

Do you have an example of the nextion_component_set_property_text function? I am confused with "property_name"

gfurtadoalmeida commented 2 years ago

Nice! I do not have an official example, but you can look at this test.

The function nextion_component_set_property_text sets a component property to the text value passed on the text parameter. The property_name is the name of the property you want to set. For this function, the property being set must accept text.

Let's say you have a textbox name "t0" and you want to set its text to "Hello World", in this case the property_name would be "txt". You can get the property name in the component's property tab (example below). Every component has different properties.

image

oswatt55 commented 2 years ago

thanks for your explanation and example, my project works correctly, thank you very much

gfurtadoalmeida commented 2 years ago

Happy to help!