Start a new topic

Connecting Nexton 2.4 Display to Arduino Yun


Has anyone been able to connect the Nextion Display 2.4 to arduino yun?

Thanks in advance,



1 person likes this idea

Hello Lefteris,

I have some problems with arduino Yun and Nextion Display 2.8, could you share the part of the libraries that you modify please?

Best regards.

Please review documentation for the Yun

Please check NexConfig.h to ensure nexSerial is set to your needs


You only need to change the NexConfig.h

I'm using a Software Serial so I can use both the display and have a software serial port that was required in my project.

Mine looks like this:

#ifndef __NEXCONFIG_H__

#define __NEXCONFIG_H__

#include <SoftwareSerial.h>

extern SoftwareSerial HMISerial;


 * @addtogroup Configuration 

 * @{ 



 * Define DEBUG_SERIAL_ENABLE to enable debug serial. 

 * Comment it to disable debug serial. 




 * Define dbSerial for the output of debug messages. 


//#define dbSerial Serial


 * Define nexSerial for communicate with Nextion touch panel. 


#define nexSerial HMISerial


#define dbSerialPrint(a) dbSerial.print(a)

#define dbSerialPrintln(a) dbSerial.println(a)

#define dbSerialBegin(a) dbSerial.begin(a)


#define dbSerialPrint(a) do{}while(0)

#define dbSerialPrintln(a) do{}while(0)

#define dbSerialBegin(a) do{}while(0)


Also forgot to mention that you need to define the HMISerial in your sketch then:

#include "Nextion.h"

SoftwareSerial HMISerial(10, 11);

I try this and not work, any example? please i need help

Well I can't get it to work.

I've spent hours and hours, but nothing did work.

It seems, from what I was reading that with the Yun we need to use a Software Serial, as the Yun's Tx/Rx pins (1,2) are used by the Bridge.

I've managed to configure the nextion library to use the software serial and configured software serial to work on ports 10.11, however the nextion display is not responding, so either the software serial is not working, or I don't know.

If anyone managed to get the Yun to work with the Nextion display, please let me know how!

Thank you

I'm banging my head to the wall right now.

After all the problems and hours, the problem was that the Nextion must be connected to the Yun +5v/GND 

I was using an external power for the nextion power supply and this seems to make all the difference.

So sad this is not mentioned anywhere and spent 4 hours for nothing.

If using the ITEADLIB, it is configured by default for the MEGA.

You will have to configure the lib for your YUN.

Loads of links in Google on how to configure for your board.

Also reading through the threads in Free Chat should help, as this has been addressed several times.

hi, i try to connect Nextion 4.3 to arduino yun, but i can't, i need help please, i need use software serial? please helpme

Hi Lefteris

   This really works in YUN!!

Thank you very much.

Best Regards :)

Please refer to the Nextion FAQs

A serial connection is most definitely required.

Login or Signup to post a comment