Start a new topic

Nextion at Raspberry PI

Hello There, can you please make a tutorial for the Raspberry PI? I've been trying to connect the display with the Raspberry for days.

Hi,yes,there is.

You can download the code for raspberry Pi.

Is it possible to publish a Python example that is not so complicated?
It would also be nice to have a step by step guide on how to configure the UART at Raspberry interfaces.

I am searching too. I need Nextion Screen connection with Raspberry Pi & Python (GPIO TDX, GPIO RDX)

1 person likes this
I spend all weekend to make it work. Please help us with this Subject.
Raspberry + Python + Nextion = unknown
I don't have any respond via Python Serial - even when i add 0xff 0xff 0xff at the end of command.
With best regards
Nextion owner


I am also a little surprised and disillusioned, really :(

This display (2,4" and 3,2" too ) I have a couple of days, and it seems that it will not be easy. 

Documentation and references (for Raspberry) are very superficial and inadequate.

I have installed the "default" software - Nextion Editor v0.31 (which is really still unfinished...)

My first experiment was with Arduino - and I was partially satisfied a few attempts (after a day of experimentation -> Arduino uno + softwareSerial) - it looks quite good..  at last Arduino edition 1.6.6 
...and Raspberry? (tested B and 2) 

As a next step I am trying  "hard-connection" through UART - and - do you think is known the exact configuration? No.

So I tried (Raspbian & Python):

s = serial.Serial(port='/dev/ttyAMA0',baudrate=9600,                                                   


            xonxoff=False, rtscts=False, 


            dsrdtr=False, interCharTimeout=None) 

#simple reading 7 bytes

num = 7

readdata = #7

print i, ">",hodnota 

#print (readdata [0]).encode("hex"),(readdata [1]).encode("hex"),

for ii in range (num):

    print (readdata[ii]).encode("hex"),

... reading looks quite good now, but writing?!

#simple chr?

def n(co):


def nErr(co): #err. len(data)


#simple label (similar arduino test)

def displLab():

  s.write(" t1.txt=")



  n(0x22) # "





What about "END-SIGN"?
3x 0xFF or 0x7f (this I am reading - when I connect arduino with RSP... and compare the UART data code)
What about 3.3V to 5V?
I tested also with some "3.3V to 5V converter" (google.. BC547, FET is better..) but still not working!

My questions:

1) can it be used directly to UART? (via Python Serial)

2) volatge is OK?
3) what about simple Python tutorial? just change single label...

some advice, links, referrals?

yenda -

@iteadstudio? No answer? :-(

I'm waiting too for help.....
Mr. Honza - I try reading from Nextion - using your code - but without result could you help me?


Any news about a python script????

Hey, follow this link for Python and Node.js code :

Is there anyone who successfully interfaced Raspberry pi with Nextion display using Segnix or by any other means.Please do reply.

However, Pi is not my MCU, you will need to refer to Pi's documentation

 - as well as code from the github for Segnix and Nextion Segnix library.

Again PySerial has also been used

 - Nextion is a TTL Serial Device.

Versions of software have changed over time

Hardware has changed over time

 - is Pi Zero supported, maybe different that Pi 2

 - which versions of PySerial, etc

However if your Pi has a hardware UART, it can indeed be done

- I have not worked with Pi to tell you step by steps.


I'm confused with nextion + raspberry+ python

with this library

do i still segnix? what is the point of segnix. I don't understante

help is apreciated

1 person likes this

 forum closed since Nov.15 2017 ...