Nextion Serial Touch TFT G-LCD

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
User avatar
Alan_37
Posts: 179
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 51 times
Been thanked: 54 times
Contact:

Nextion Serial Touch TFT G-LCD

Post by Alan_37 »

Hi

This would be a nice Touch TFT G- LCD component for flowcode .

--> https://www.itead.cc/wiki/Nextion_HMI_Solution
--> https://www.itead.cc/wiki/Nextion_Instruction_Set

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Nextion Serial Touch TFT G-LCD

Post by Benj »

Hi Alan,

Nice timing!

I've just had one land on my desk this morning. I'll investigate what we can do to simplify things in a component.

User avatar
Alan_37
Posts: 179
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 51 times
Been thanked: 54 times
Contact:

Re: Nextion Serial Touch TFT G-LCD

Post by Alan_37 »

Hi benj

That is great , I have been playing a bit with the commands
here is what I have discovered so far

Default Baud rate = 9600
ÿÿÿ must be added after each command if not sending from nextion Editor
When using get command to get numeric values nextion Display responds in Hex Value !

Task .......................... Command Example

Change Baud rate to 19200 ---> bauds=19200
Edit Text of t0 ------------------> t0.txt="Hello"
Get t0 value ----------> print t0.txt
Set n0 100 ---------------> n0.val=100
change Background color -> t0.bco=5265 + ref t0
Refrash a Component ----> ref t0
Add Data To Waveform ---> add 1,0,150

When using get command to get numeric values nextion Display responds in Hex Value !!

Get Gauge z0 value ---> get z0.val
Get Number n0 Value --> get n0.val

Get a numeric value of Gauge z0 in text format from Nextion

In Editor Add a variable , set it to type text , object name = va0
than send the following 2 commands .

cov z0.val,va0.txt,0
print va0.txt


SEND RS232 Command From Nextion to MCU --> print "String to send"


Multi line Text -----> t1.txt=t1.txt+"hello \r"
Display String Lenght --> strlen t1.txt,n3.val

Post Reply