How to use addr variable?

I’ve tested putting on program side (simply adding addr=300 b.e) , writing it al page 0 preinitialice zone but it doesn’t work at all. No bugs when debugging but simply nothing changes. And if I test the value by writing printh addr I always get the same result AD 70 (if I can remember right)
Some help??

Of course, I’ve searched the forum and I can’t find the addr word

Many thanks in advance

Hi,

As said in the Guide Help, a Nextion variable uses 4 bytes for each data. For example, if you write 48 (dec) at Addr 0, the Nextion will write 48 (dec) in Addr 0 (LSB), 0 in Addr 1, 0 in Addr2 and 0 in Addr 3 (MSB). If you want to write several datas, you have to skip addresses, by example 0,4,8,12 and so…
This said, I used a lot of datas in the Nextion EEProm, and it works fine.
For example : if we have 4 bytes v, w, y, z in Addr 12

a=v x1 (LSB) (addr 12)
b=w x256 (addr13)
c=y x 256 x 256 (addr14)
d=z x 256 x 256 x 256 (MSB) (Addr15)
This data value of Addr 12 is a + b + c +d

I hope this wlll help you

Best regards,

RovDan