Start a new topic

escape characters

 Hello,
The Nextion does not want escape characters.
Print "\ n" returns an error

Print "\ r" is not an error

Output Nextion: 0x0d 0x0a

Which is CR and LF

Is this a bug in the Nextion, or is it correct?
The Arduino can handle this very well.

Greeting and thanks
Andreas


Nextion side \r is supported.

0x0D and 0x0A are not supported

"\ r" and "\ n" should both return errors due to their space

This is not a bug, what is not supported is not supported

Hello,
sorry ...
that's right:

Print "\r" is not an error

I am concerned about the transferred to the Arduino.

Print "\r" is correct?

And the output of the Nextion 0x0d 0x0a is also correct?

I would like to know exactly, we have such a problem with it.
http://forum.arduino.cc/index.php?topic=477169.15
Greeting and thanks
Andreas

 

I agree with your participation in Arduino forum

  such is the proper place for Arduino issues

Again, I will reiterate Nextion use of \r is supported

 and 0x0A and 0x0D is NOT supported.

Please separate these two and make distinction

  0x0D is a single byte, Nextion \r is two bytes 0x5C 0x72

If you need to send either of the non-print characters "\r" or "\n" from Nextion

Then just send the hex equivalents with printh.


Nextion coding is not to be thought of as some kind of C++ extension, the compiler works in a very different way.


printh 0A  will send the single byte for line feed (or "\n" as we more commonly use in C++)

printh 0D  will send the single byte for carriage return (or "\r")


You can build strings using both print and printh similar to Arduino C++


print "Hello"

printh 0A

print "World"


is valid Nextion code.






Hello,
printh! I could have imagined that.
I thank both of you
Greeting and fun
Andreas

 

Whole strings as Hex works too..


printh 48 65 6C 6C 6F 0A 57 6F 72 6C 64


is the equivalent of Arduino .print("Hello\nWorld");


and there are no terminating characters (0xFF 0xFF 0xFF) to deal with either, Nextion only sends what you tell it with print and printh


:)

Login or Signup to post a comment