Start a new topic

send a string from nextion to serial

hello, im using nextion 4.3 display, i make my pages, buttons, all ok, but i dont found how i can send some string from nextion to my microcontroller.

example:


i have a page when i write a operator name, i save this operator name on Nextion Eprom, but i need too send this operator name to my microcontroler. or if cant possible i can write this from my microcontroler eprom, but i need receive this name.

now i can write and read from nextion eprom, but dont found how i can send this string to my microcontroler..


need a help


thanks

Roberto 


Wow, I was stuck trying to send data and instructions over serial....I tried TTL direct connection and RS232 to RS232 connection.....It took me ages to realize that.....the ASCII TX and RX will not work as expected, I was using teraterm to confirm the TX/RX this was a mistake as the FF char is font related (Not used normally) and the response gave the touch ID of 65 and this is 'e' followed by null followed by the id of 0x0D (Char return) so as you can see it is not as straight frorward as you would think, you will need to populate the buffer with hex values and not sprintf to buffer, this would cause problems with your nulls and 3xFF to terminate the command/instruction.


I am glad  have found this issue and have installed realterm that allows me to TX/RX hex instead of ASCII. At one point I thought I may have a faulty TTL output but....It now works, I will be interfacing this with a PIC18 rather than the Arduino So will need to build a table to dissemble the incoming code with reference to the instruction manual....I advise that you look through the manual for the return codes and transmission codes to read from the Nextion EEPROM send repro and to write use wepro, check the instructions for the string you need to send, I did see a warning somewhere in the instruction manual so read it carefully before messing with this.


If you connect the Nextion via RS232 chip to RS232/USB adapter you can run the screen from the program and simulate the MCU commands, this should give you an indication as to the return hex values to expect.

This forum closed.  New forum open https://nextion.itead.cc/


1 person likes this