Pyboard <UART> Nextion

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Mark_C
Posts: 5
Joined: Wed Mar 13, 2019 8:27 pm

Pyboard <UART> Nextion

Post by Mark_C » Wed Mar 13, 2019 9:45 pm

Hi All,

I searched for a long time on a allot of sites including this one. I found again A LOT of death end topics.
and no answers so finaly I registerd here to asked for help.

HELP :roll:

in the below code is on of the manny things I tried without any result.
On my scope hoewever showed me Hello afther a uart.write("Hello") so the UART works
The pins are just for some program status leds en the while loop so I had some time to check the wiring.

just a line of code to write to the nextion display so I'm on my way...



Tnx



from pyb import UART
from pyb import Pin
import time
p_start = Pin('Y12', Pin.OUT_PP)
p_stop = Pin('Y11', Pin.OUT_PP)
p_start.high()
teller = 1
uart = UART(3, 9600)
#uart.init(9600, bits=8, parity=None, stop=1)
while teller < 1000:
uart.write('t1.txt="Hello"')
uart.write('\xFF\xFF\xFF')

p_stop.high()
time.sleep_ms(500)
p_stop.low()
time.sleep_ms(500)
teller = teller + 7


p_stop.high()
time.sleep(2)
p_start.low()
p_stop.low()

Mark_C
Posts: 5
Joined: Wed Mar 13, 2019 8:27 pm

Re: Pyboard <UART> Nextion

Post by Mark_C » Sun Mar 17, 2019 9:17 am

Nothing? mmm

minimum support for the pyboard so time for the bin.

trying Pi0 now

tnx anyway.

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Pyboard <UART> Nextion

Post by Turbinenreiter » Sun Mar 17, 2019 9:41 am

Why are throwing your pyboard in the bin instead of the Nextion?

You don't need support on the pyboard side of this system - the UART works fine. It's Nextions interface you need help with. Sadly, no one here seems to know that hardware, thus nobody was able to help you.

Anyway, on the more constructive side:
try writing

Code: Select all

b"blabla"
-> the b makes the string into bytes. Could be the Nextion wants that encoding.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pyboard <UART> Nextion

Post by Roberthh » Sun Mar 17, 2019 10:58 am

According to the data sheet, the Nextion displays are 5V devices. Even if the Pyboard is 5V tolerant, the ouput level may be too low. So you might need a level shifter for PyBoard TX -> Nextion RX. Besides that, I see no reason why you should not be able to drive that display with a Pyboard. Please verify the connection and your command usage.

Mark_C
Posts: 5
Joined: Wed Mar 13, 2019 8:27 pm

Re: Pyboard <UART> Nextion

Post by Mark_C » Fri Mar 22, 2019 9:13 pm

@Roberthh Tnx... but the chip on the nextion is a stm32 en on the pyboard also and I checked TX to RX.
no voltage regulators and de voltage is the same. acc. to te specs. tnx again

@Turbinenreiter tnx...I tried the B and b. but nu improvements. Its realy anoying. uart is uart. I see the nextion in manny other projects the nextion working over uart but not on the Pyboard.

The nextion is easy to use for some of mine projects. I want to build them w python thats why I dont bin the nextion.
And I don't bin the de pyb....mayby good for som other poject...

tnx anyway...

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: Pyboard <UART> Nextion

Post by rhubarbdog » Sat Mar 23, 2019 4:47 am

You have got a good ground connection between the pyboard and nextion?

Mark_C
Posts: 5
Joined: Wed Mar 13, 2019 8:27 pm

Re: Pyboard <UART> Nextion

Post by Mark_C » Sat Mar 23, 2019 4:16 pm

Yes perfect ground doubles checked al the connection w my multimeter. Tx > RX, RX > TX and GNG > GND.

Strange...both devices have te same chip? I looks like putting water in on site off the hose and it never comes out the other site.

Going to try an arduino now to check if the Nextion is working.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pyboard <UART> Nextion

Post by Roberthh » Sat Mar 23, 2019 4:25 pm

Did you try to swap RX and TX. Sometimes the labeling is the other way around at "sleve" device, telling which signal it should be connected to.

Mark_C
Posts: 5
Joined: Wed Mar 13, 2019 8:27 pm

Re: Pyboard <UART> Nextion

Post by Mark_C » Sat Mar 23, 2019 6:21 pm

Yep...

the uart.write is in a while loop so I can do some testing and also checking the wiring.


whit every test I changed de TX<> RX

Tnx

Post Reply