0

I just got a nextion display connected to my Raspberry pi 4. Every time a button on the display is pressed, it's supposed to send a 1/0, but instead it sends this: b'\x00\x00\x00\x00', or this: b'\x01\x00\x00\x00'.

This is the chunk of code that I got: readTxt=ser.readline() print("Data Received" + repr(readTxt))

How are we supposed to read something like this? What function is used to convert something like this back to string/integer?

I also tried to add photos of my setup but the website says the files are too big

I tried with a repr(readTxt).decode('utf-8') but then there was no output at all...

Mito
  • 101
  • 2

0 Answers0