Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    UART Issues

    Scheduled Pinned Locked Moved LoPy
    4 Posts 4 Posters 1.5k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      PeterBaugh
      last edited by

      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.

      D R 2 Replies Last reply Reply Quote 0
      • D Offline
        daniel @PeterBaugh
        last edited by

        @PeterBaugh Hi!

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

        Cheers,
        Daniel

        1 Reply Last reply Reply Quote 0
        • R Offline
          rskoniec @PeterBaugh
          last edited by

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

          The machine is working as good as it's code.

          1 Reply Last reply Reply Quote 0
          • N Offline
            nathanh
            last edited by

            Hi,

            I'm also experiencing this exact same problem with a Sipy and expansion board. Has there been any solution/reason to this issue?

            Using an external GPS but of the same brand type that is on the Pytrack (mine is the l80). Using the same speed and pins as the original poster.

            Sipy and Expansion board have both been upgraded to the latest firmware.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom