Start a new topic

Easy way to test communication between MCU and Nextion?

Hello,

i'm a beginner... The Little Project:

I will switch some Relays on and off. The switch command (from Display to MCU) works fine. But the answer from the MCU has no effect...

It shows like:

  strcpyf(Displaybefehl,"click b1,1");
  printString1(Displaybefehl);
  putchar1(0xff);
  putchar1(0xff);
  putchar1(0xff); 

Target is to fire a press Event for Control "b1"

any ideas?

Greets

Daniel



click b1,1 over serial

- it will execute the code inside b1 Pressed Event

- it will not trigger an 0x65 Nextion Return Data.


What was the answer from the MCU you mention?

Hello,

no way... in the debug window yes this works. But not over the physical serial Line. Measure:

there are Datas.

I use a Arduino Mega2560 the Level on the RX/TX Line are 5V. Problem?

Stand on....

Greets

Daniel

I have no issues with Mega on Serial2 as per NexConfig.h

Nextion is 5V tolerant - no problems because of


Hello,

i don't use the library... Maybe have to do soon

Yes, i have tried to do it with Hex "65 02 08 01 ff ff ff"  the same...

NextConfig.h have to search...

Greets

Daniel

I am sorry, I am not sure of your understandings

and how much of this you have done in what method.


Perhaps look at the IteadLib Arduino Nextion Library

- use it, or follow its code as your example to fit your needs

Yes i have to do so ;-)

Now all works fine :-)

Typically for me: i had a "0x20" between command and the finals 0xff 0xff 0xff....

Without this all the commands works fine. So i see no Advantages to use the funny Lib.

But anyway...

Thank you

Lib has advantage to those less skilled on how to set events

Ahh, stray spaces.  Careful of those

Nextion Instruction Set has a few extra spaces that shouldn't be there as well

I don't have access to change,

but mostly only one space after command, none in parameters after space

Yess, noted ;-)

 

 Hi Dany, greetings to Swiss ...

thx ;-)

 

Login or Signup to post a comment