Start a new topic

Questions about the Nextion Instruction Set

In the instruction set there is a chapter "System Variables List". Some questions:

  1. What is the purpose  of this list? For example: can I send the string "dim=500xff0xff0xff" to set the brightness to 50%?
  2. In this list ITEAD is talking about "touch drawing function". Is that function operational and how to activate it?
  3. I can set the brush color for touch drawing but can I set also the brush width?

Thanks, regards...

1 person likes this idea

@Wijnand Nijs

1.This list is the hardware commands.

2.Just send "thdra=1" to active the "touch drawing function",and you can send "thc=RED" to set the brush color to red or others.

3.To set brush width? Not yet.


1. The System Variables List should be updated with 'baud' and 'bauds'.

2 people like this

4 people like this


You just forgot the value "9600" :-)

Haha~~Tks! I think "9600" is not welcomed by the people who likes "baud". :-D

What's the valid range for the system command "dim"?



Is it possible to read the value of dims and store it in a variable on startup?

dimval.val=dims  doesn't seem to work

 Okay, I don't get this. In the Instruction set there is no mention of how to SET a variable.

I am trying to use a Nextion display from a RPi and Segnix didn't compile for me, and frankly, I'm not sure I need it. I'd be happy to bang some commands from python over serial, and I have had mixed success with the instruction set. For example, whole page refresh works, changing the display brightness work, making buttons click with a command works (well, if I omit the space: "click b0,1" works, "click b0, 1" doesn't). Changing the values of text boxes or the txt of buttons either returns 0x00 or 0x1A.

I need some help, please.

Never mind, I figured it out. It does need to be in the documentation, though. For the record:

does it. The quotes are important.

an assignment to a string variable is always in quotes ...

I second Gerry. Things which are self-understanding (like quoting a string) should not blow up whatever technical documentation. 

I think that one may expect from someone who creates a project with a Nextion display connected to whatever MCU that he/she has already at least basic knowledge in programming and some experience in handling serial data transfer.

Yes, my bad. Happy?

Nevertheless, the documentation does have errors which have nothing to do with serial data transfer but everything to do with command syntax; and although getting a variable's value is covered, setting it is not, which I consider quite an oversight. You may think it's obvious, but there could be any number of other obvious formats, bearing in mind that this command set does is not bound by any programming language restrictions. 

The errors contained within the Current Version of the Nextion Instruction Set are indeed errors.  If I had access to change such I would have already.  Yep, my OCD is kicking, but alas no control for.  Pinned to the top of the Report a Bug section is Grammatical Errors and Document Corrections.  Here, the intent is that the one for whose role the N.I.S. (et al) is, will take from this thread and make such Document corrections.

Login or Signup to post a comment