Unofficial Nextion/TJC User Forum

Can Raspberry Pi SCM send multiple instructions to the display screen?

If I want to modify the values of 10 variables with discontinuous addresses, can I send 10 instructions in succession with time intervals added in the middle or wait for the reply signal from the screen?
I was able to do it by using stone’s screen, and I think they should almost be able to do it as well.

Serial buffer is 1024 bytes, if you work at 9600 baud I think that you have non problems to modify 10 variables.

Even at higher baud rates, this should work in the “throw and forget” mode. The secret is optimizing the transmission by using very short variable names…

“theThingyPlacedOnTheSecondScreenInTheLowerRightCorner7.val=5992” eats more serial buffer than “p[2].b[7].val=5992”

Though pages and variables can’t have more than 14 characters, limiting the maximum variable name length to something around 32 chars.
This also means that with only 10 variables you shouldn’t be able to cause a buffer overflow; 100 chars per command should be enough for most things.

If you want to be absolutely sure, change bkcmd to 3. Then you’ll get an acknowledge for everything you send. If your sending code waits every time for the acknowledge, you have the guarantee that everything got received and processed correctly (Details as always in the Nextion Instruction Set).
If interested, here’s my take at such an acknowledge function. Send your command, call acknowledge() and done.

Kind regards,
Max

What if the baud rate is 115200? Is it possible to do that?

Is there a video demonstration? Change 10 variable addresses at a time at high baud rates.

Thanks for your reply, I will follow this method and test it.

Why’d you need a video demonstration? I suggest that you take the time to approach that topic scientifically and do your own tests with increasing baud rates. The own experience is normally much more convincing and satisfying than just seeing that others managed to do a thing.

Hi… I’ve not had any issue exchanging between Pi’s employing a HDMI switch. In case the Pi’s aren’t designed to yield HDMI when they boot up, you’ll have issues once you come to choose those Pi’s afterward, but you ought to be able to switch back to the initial flag I would have thought. I have a TV which in some cases comes up short to perceive an HDMI stream when turned on, but is at that point fine once a few other HDMI stream has been chosen and I have exchanged back.


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).