Read a Nextion variable from a picaxe..


New Member

I tried to read a nextion variable or the text of a nextion Texbox. I am uabled to have any return...

What is the syntax for the Picaxe to read any variable or any object visible on the Nextion ?

I plan to do a DIY weekly switch for my house'heater. I finished the GUI on the Nextion (5"). It works fine on the Nextion simulator.

Now, How can the Picaxe (20M2) read all of that ???

Many thanks for your tips...

Best regards,



New Member
Hi Ibenson
In the meantime, I spent all my evening studing and testing the “Get” instruction, and I successed.
To read a nextion number variable var1, whose content is 600 and located on page1 : my Picaxe must send for example :
Serout SortieNextion,T9600_16, (“get page1.var1.var”,255,255,255)
The Nextion reply is : 113,88,2,0,0 (in decimal, I prefer than in Hex)
113 is the Nextion Code of the decimal reply ($71)
88 is 600 mod 256
2 is 600/256
0,0 are used only on greater variables. Nextion allows to send up to 4 bytes numbers.
To read a nextion Button Caption Bn1, whose caption is “ON” and located on page2 : my Picaxe must send :
Serout SortieNextion,T9600_16, (“get page2.Bn1.txt”,255,255,255)
The Nextion reply is : 112,79,78 (In decimal)
112 is the Nextion Code of the text reply ($70)
79 is ASCII of the character “O”
78 is ASCII of the character “N”

It seems necessary to use Global variables instead of Normal variable for that use...

One more time, thanks for the replies. I go on to my heating control project.

Best regards,