UART Issues



  • I am trying to read NMEA strings over UART, I can get this working fine however after a period of time I get a NoneType when running com.readline().

    Code to reproduce the problem is below.

    from machine import UART
    from time import sleep_ms
    
    # Setup comms to the GPS
    # G11 to GPS Rx
    # G24 to GPS Tx
    
    com = UART(1, baudrate=9600, bits=8, parity=None, stop=1,pins=("G24","G11"))
    
    while True:
        print(com.readline())
        sleep_ms(1000)
    

    It would appear that sending data over UART0 causes partial or complete NMEA strings to be printed. I am wondering if this is a buffer problem or interference?

    
    Running gpstest.py
    Soft resetting the LoPy
    None
    None
    b'00329.3998,W,0.07,23.12,170117,,,D*48\r\n'
    b'$GPVTG,23.12,T,,M,0.07,N,0.14,K,D*08\r\n'
    b',20,26,03,050,*4B\r\n'
    b'$GPRMC,101354.000,A,5042.5075,N,8,48.3,M,50.4,M,0000,0000*4F\r\n'
    b'$GPGS48\r\n'
    b'$GPVTG,23.12,T,,M,0.07,N,0.14,K,D*08\r\n'
    b'$GPGGA,1009\r\n'
    

    LoPy details below:

    (sysname='LoPy', nodename='LoPy', release='1.3.0.b1', version='v1.8.6-379-gc44ebac on 2017-01-13', machine='LoPy with ESP32')
    

    Any help greatly appreciated.



  • @PeterBaugh Did you check on f/w 1.4.0.b1 ?


  • administrators

    @PeterBaugh Hi!

    I'll investigate this issue asap. Thanks for the report.

    Cheers,
    Daniel


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.