Skip to content

in_waiting missing from board.UART #1046

@Fancy2209

Description

@Fancy2209

Board Name

Raspberry Pi Pico

Steps

  1. Install MicroPython on the Pico
  2. Install Blinka and the Adafruit_CircuitPython_GPS Lib
  3. Connect the Adafruit Ultimate GPS Breakout to the Pico
  4. Try to run gps_simpletest.py

Description

The board.UART implementation doesn't have in_waiting, which is used by the Adafruit CircuitPython GPS Library, preventing it from working on the Pico.
Closest related issue is #332

Additional information

I was able to successfully port the GPS library to pure MicroPython by making the in_waiting getter in the GPS lib return

result = self._uart.any()
return result if result == 0 else int(result / 8)

But I am not sure if that's the right way to handle this.

MicroPython is also missing time.struct_time and time.monotonic(), I replaced them by a List and time.time_ns() to be able to get the GPS lib to work, though I should probably open an issue or PR on the GPS Lib about that once this is fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions