Unofficial Nextion/TJC User Forum

Printh with Values

im trying to send some hex values to the MCU by using:

printh AA BB CC DD EE FF


Now I want to replace one byte to a value from a variable:
printh AA BB CC DD va0.val FF

Dont work. Prints: AA BB CC DD 00 FF, anyhow whats into the var0

prints va0.val,1 works but I need it in one message.


i am not sure if that works.
You should send the first HEX bytes by printh, send use the MCU to request the value of va0
Or better is to request everything you need from the MCU.
Thats how i do it, Nextion is “stupid” and MCU handles everything.

just put rhem in differet statements one after another.

printh AA BB CC DD
print va0.val
printh FF

It shouldn’t make any difference as they are concatenated in the serial buffer anyway.

1 Like

This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).