Start a new topic

Error with someone commands UART

 Hello, I am having a problem with sending commands to my screen (NX4827T043_011) by UART, I am sending via UART a command to change the value of a "gauge" but I always have same report (0x1A), I Am using this code in a PIC, I can see that the speed is correct and that the sending of data by the PIC is correct, I am this code:

While (BusyUSART ());
PutrsUSART ("gauge.val = 90");
While (BusyUSART ());
WriteUSART (0xff);
While (BusyUSART ());
WriteUSART (0xff);
While (BusyUSART ());
WriteUSART (0xff);

I also have the same problem with other commands such as "vis gauge, 0"

when i Putting these commands in the "Debug" mode of the Nextion Editor software all work fine but for UART they do not work, I am using Nextion Editor version V0.47

other commands, for example "cls" has good run with UART
While (BusyUSART ());
PutrsUSART ("cls RED");
While (BusyUSART ());
WriteUSART (0xff);
While (BusyUSART ());
WriteUSART (0xff);
While (BusyUSART ());
WriteUSART (0xff);

1 Comment

Try to imagine

   Nextion firmware is small, compact and tight.

   Parsing should therefore be, somewhat byte by byte

   where would such whitespace evaluation be?

Perhaps if it were in firmware, then cut user space

  - Enhanced models by 1/2 to 4096 bytes

  - Basic models with only 3584 bytes ... a whopping -512

So negative bytes for  Basic models is a deal breaker

  - no whitespace interpretation.


The space char 0x20, used to separate command from parameter

Almost all parameters separated by comma (printh is an exception)

Therefore

   cls REDÿÿÿ

   gauge.val=90ÿÿÿ

   vis gauge,0ÿÿÿ


Edited: note separated by comma

Login or Signup to post a comment