Chat freely about anything...

User avatar
By wchpikus
#66947 I have nextion lcd and i trying send to them some data using lua script.

I saw examples to this,but only using arduino software..i like to use only esp and lua.

One thing is hard to do,maybe someone has solution.

I have to send 3x 0xff data to the end transmission.
In lua to send hex command is write(0,0xff,0xff,0xff)
Now i have to split this with print command,but it must be one command e.g. print("t0.txt=/"test/""....and here send hex data)
If i send hex in next line,to the end of print command i got /r/n so this method is not ok.

How to send some hex data inside the print command?
Variable,table or using function inside?
The string must look this:
"t0="test"0xff 0xff 0xff (0xff='255' in asci,11111111 in binary).

i tried this:
print("g0.txt=\"aux test\""..(string.char (255))..(string.char (255))..(string.char (255)))
and this work ok....but on the end of line i got /r/n...
How to disable this brake line (/r/n) strings?

It should send command like this:
Image



Regards