Start a new topic

Getting help with Nextion Interfacing

I want to interface Genuino MKR1000 board with Nextion TFT.
Please providde some support.

Also I am facing error in examples of  ITEADLIB_Arduino_Nextion-master library for Arduino Uno.
Please provide some support. 

The Nextion device is a Serial device using TTL over two wire RX/TX

As such, this provides access by 1000's of MCUs in 100's of programming languages


All of the accepted text based commands are defined in the Nextion Instruction Set.

https://www.itead.cc/wiki/Nextion_Instruction_Set


For the UNO you will need to refer to the IteadLib's readme.md and make the needed

changes in the NexConfig.h


For the MKR1000 you will need to refer to your documentation


The provided library code base certainly provides sufficient example for any programmer

to modify to their own MCUs, however most prefer to implement their own logic and

programming structures suited to their own needs as an MCU is generally a resource

limited device.  For this you will need to brush up on programming in your favourite language.


To change pages within an HMI design, as per the Nextion Instruction Set, the page

command will need to be issued. The page command takes a numeric page id, or a

string page name as its parameter.  There is one space between the command and no

spaces between the parameters.  .txt attributes need to be double quote encapsulated


All commands and return codes are data terminated with three bytes of 0xFF (ÿ as a char)


Therefore changing from page 0 to page 1 requires the following sent via serial

page 1ÿÿÿ // Typo corrected


Setting the .txt attribute of components such as a Button, Text, Variable, etc

t0.txt="Hello World"ÿÿÿ


Whether your favourite programming language library does this via a setText, Serial.print,

sendCommand, tellMCU is completely up to the end user via their coding technique.


Please refer to the Nextion user manual (updating) thread in Announcements

Please refer to the Nextion FAQs in Announcements

- These two threads in particular contain the links to many resources

   - and they contain demos, from beginners to more advanced

Don't forget to check other Free Chat threads where many times the answers are written


thanks for the help.

I made changes in NexConfig.h but still there are errors while compiling for UNO board.

Arduino Uno problem is solved, all examples are working. 

Please provide some more details for Genuino MKR1000 board interfacing with Nextion.


???? what exactly do you expect?

- it is your hobby ...
- it is your choice ...
- so you also should invest a bit time into this all by yourself ...

If you still run into problems, you can ask for help, show your done code, and there is surely somebody out who will help.

 

The Nextion behaves exactly the same regardless of which MCU that is sending

the text commands.  The Nextion will reply exactly the same regardless of which

MCU will be receiving the reply.


Once the serial is defined and configured for the MCU of choice, the techniques

within the library code can be applied to the new target MCU in the programming

language of the users choice.


The Genuino is the brandname for Arduinos sold internationally, and hence is the

same hardware as the Arduino, therefore all code will still apply to the Genuino

that applies to the Arduino.  So you will be able to use the same source with

an MKR1000 once configured as the UNO once it was configured.


You will need to consult your hardware manual for how you are to define your

serial on the MKR1000, this documentation is at Arduino and is well beyond

the scope of Nextion.  To look this up is within your domain.  I am not a librarian.

Okay..Thanks for the help.

I take it you discovered the Arduino SoftwareSerial?

I know it is used with STM32 48MHz and 72MHz and also ESP8266 at 80MHz


But I didn't find a SoftwareSerial.cpp in my library folder.

Was it just an update?

Yes the issue is solved. 

Thanks.

hello

I have been interfacing my MKR1000 board with Nextion display from the past 15-20 days.

It has been working smoothly until today when i reset the board, Nextion doesn't communicate with MKR1000 anymore...Its TX and RX are not changing information with board.

However when i tried to upload another file on Nextion using USB to UART cable it was communicating with Nextion editor perfectly.

What could be the possible reason because of which it abruptly stopped communicating with MKR1000 board.

Please suggest some solution.

Thanks


- when the TFT Upload from PC to Nextion works, the Nextion definitely works ...

- check your MKR board ...


- maybe accidentially removed cables

- maybe your MKR has some malfunctions

- maybe your MKR died ...

- maybe due to the reset, your MKR flash just became corrupt ... a programm-reflash may help ...

- ...


When the reset happens at the wrong time of code execution, unforseeable things may happen ...


Just imagine, you turn off Power of your PC just somewhere in the day during work ... In worst case, you must reinstall your system too ...  why shell a MKR behave different?




I have tried with two other MKR boards..

other programming is working, just the part with Nextion is not working...

have rebooted the MKR also, but still its not communication with Nextion.



and what have other MKR boards to do with the one which does not work?

If the programm-flash of this one MKR became corrupt, you can reset as often as you like, it just won't work. You should reflash this single MKR and not try with others ...

 

Login or Signup to post a comment