B4J Question Nextion display - first command ok, other ko - SOLVED

amorosik

Expert
Licensed User
I am looking for the correct way to drive a Nextion display using B4J program
I need your help to understand why sending the following commands to the display serial port does not work as well as I expect
In the sense that the first command is executed correctly, while the last two do not
Obviously the text type controls t1, t2, t3 are present on the display page

t1.txt = "Out of range" ÿÿÿ
t2.txt = "10,345.67" ÿÿÿ
t3.txt = "44444" ÿÿÿ

Has any of you already used this type of display and can you tell me why the first command is executed while the other two are not?
 
Last edited:

amorosik

Expert
Licensed User
It was the carriage return and line feed too
I used Notepadd ++ as editor and obviously at each line end it introduces a cr + lf that are not accepted by the display
Removed all cr + lf from the file everything is now executed correctly
So for the three textbox update commands t1, t2, t3 it becomes like this

t1.txt = "Out of range" ÿÿÿt2.txt = "10,345.67" ÿÿÿt3.txt = "44444" ÿÿÿ

(the characters ÿÿÿ (three 0xFFs) are the 'end of command' that Nextion uses)
 
Upvote 0
Top