Hi,
I've successfully compiled and put the firmware on this board https://github.com/Xinyuan-LilyGO/TTGO-T-Call. But i've had some issues related to UART. When I connect an GPS module (gy-neo6mv2) , the OS hangs. But when I put the power off, OS goes further again. When I put it back in I see GPS data appearing in REPL. So I have the idea that the TX and RX are REPL pins to console. How do I disable this and allocate the pins to GPS?
issues regarding UART on TTGO-T-Call
Re: issues regarding UART on TTGO-T-Call
Indeed, UART0 is used for REPL. And the pins which are labelled TX and RX are typically links to UART0 at the default GPIO pins 1 an 3. But you can instead use UART1 or UART2 on almost any pin pair.
Like:
Thus code snippet will create the uart instance, with RX at pin 4 and TX at pin 5. Do NOT use the default pin settings for UART1 and UART2. That will crash your device and is an open issue.
Like:
Code: Select all
from machine import UART
uart = UART(1, 9600, rx=4, tx=5)
-
- Posts: 4
- Joined: Sun Feb 09, 2020 1:19 pm
Re: issues regarding UART on TTGO-T-Call
Okay, that's handy. Will do that then. Thanks!
Re: issues regarding UART on TTGO-T-Call
Hi!
I have a similar problem. I was able to perfectly compile the firmware https://github.com/Xinyuan-LilyGO/LilyG ... ython_LoBo in TTGO T CALL . I directly connected the NEO-M6 module (on pins 15 and 12) and started the UART2
When I use the comment to read, the module always answers me empty
Somebody could help me?
I have a similar problem. I was able to perfectly compile the firmware https://github.com/Xinyuan-LilyGO/LilyG ... ython_LoBo in TTGO T CALL . I directly connected the NEO-M6 module (on pins 15 and 12) and started the UART2
Code: Select all
uart = machine.UART(2, rx=12, tx=15, baudrate=9600, bits=8, parity=None, stop=1, timeout=1500, buffer_size=1024, lineend='\r\n')
Code: Select all
>>>uart.readline()
b''
>>>uart.any()
0
Re: issues regarding UART on TTGO-T-Call
uart.read() does not block. It returns immediately with the data being present, or None if no data is available.
Ar you sure that data has been sent? An easy test is to connect tx and rx, write data first and then read it back.
Ar you sure that data has been sent? An easy test is to connect tx and rx, write data first and then read it back.