Start a new topic

Actually connecting to the Nextion display?

Hi guys,

I'm really confused about how to actually connect to the Nextion display attached to my raspberry pi. I've figured out how to send text to it and have it display on the screen, but how can I read from it and use the commands as listed in the Nextion documentation?

It's a 2.4" TFT screen.



Just as an FYI - I plan to be using Python with this. I'm using serial.write to send the data. doesn't seem to work but I could be getting the syntax wrong.


The key to a good answer, is a good question.

What does actually connect mean? 

    How to wire it up?

    How to fasten Nextion to the Pi?

    How to start the signals?

When learning for Pi - best to ask fellow Pi users

 - I have a Lemon Pi, not the same - mine is for dessert.

When learning for python - best to ask fellow python users

 - I could give Pascal code - but that wont work on python.

Hi Patrick,

Thanks for you reply. Let me reiterate my question.

I have the 2.4" Nextion display connected to the GPIO pins of my Raspberry Pi. I'm trying to interface with the screen using Python, currently I'm able to use PySerial to interface with the screen and use ser.write() in order to send text to the screen. However, what I'm missing is being able to read data from the screen, just as t0.txt, and to be able to send the other commands from the Nextion instruction set.



so what other method/functions are available for your ser object?

 - you have identified .write() method .. what other methods available?

I have and ser.readline. I basically want to read back values of text boxes and return button presses for my code.


read makes more sense as readln usually has a cr/lf/crlf context

- if linebreak is user changeable, then readln changed with 0xFF0xFF0xFF as linebreak maybe.

What other programming languages do you understand?

- I not several versions of PySerial, and from many places

  which version of which place makes a difference

If you understand C++ than grab Arduino Nextion Library and use as template to follow

But this ole dawg does feel like learning python for an MCU I don't have on Easter.

Itead also wrote a Nextion Library for RaspPi ... but it is your goal to do in Python

Login or Signup to post a comment