Pyboard <UART> Nextion
Pyboard <UART> Nextion
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
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()
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
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()
Re: Pyboard <UART> Nextion
Nothing? mmm
minimum support for the pyboard so time for the bin.
trying Pi0 now
tnx anyway.
minimum support for the pyboard so time for the bin.
trying Pi0 now
tnx anyway.
-
- Posts: 288
- Joined: Sun May 04, 2014 8:54 am
Re: Pyboard <UART> Nextion
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 -> the b makes the string into bytes. Could be the Nextion wants that encoding.
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"
Re: Pyboard <UART> Nextion
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.
Re: Pyboard <UART> Nextion
@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...
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...
-
- Posts: 168
- Joined: Tue Nov 07, 2017 11:45 pm
Re: Pyboard <UART> Nextion
You have got a good ground connection between the pyboard and nextion?
Re: Pyboard <UART> Nextion
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.
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.
Re: Pyboard <UART> Nextion
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.
Re: Pyboard <UART> Nextion
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
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