I am currently using micro python on STM32Fdisc board, attempting to interface with GPS module. I have tried your code and also tested my code but i am unable to read data from GPS.
Do you have any idea about this problem, why it happen ?
Here is the code:
I printed the buffer and the value is 0. So do you have any idea what can be the reason ? I have checked the GPS module its working using C/C++ and also the UART is working fine.import pyb
import pyb,micropython
from pyb import LED, Pin, UART
rx = bytearray(250)
i = None
uart = UART(2,115200)
data = bytearray(255)
j = 0
#Capture Data in the Rx buffer
for i in range(255):
uart.readinto(rx)
print(rx)
# x = uart.readchar()
# print(x)
if i == 255:
break