adafruit / Adafruit_CircuitPython_GPS

GPS parsing module for CircuitPython. Meant to parse NMEA data from serial GPS modules.
MIT License
75 stars 58 forks source link

"ImportError: no module named rtc" when running gps_time_source.py #88

Closed P2AK closed 1 year ago

P2AK commented 1 year ago

I'm trying to run gps_time_source.py on my Pico with the Adafruit Ultimate GPS module, but I get this error:

File "", line 11, in ImportError: no module named rtc

Screen Shot 2022-09-22 at 19 29 00

Sorry if the solution should be obvious, but I'm quite the novice Python user. I can't seem to find the rtc library needed to satisfy "import rtc" .

This is what my Raspberry Pi Pico files/folders look like.

Screen Shot 2022-09-22 at 19 18 01

Just as an aside, do I have to define which uart tx and rx pins I'm using? I was able to read the raw output from the Adafruit Ultimate GPS using UART1 TX/RX GP4/5 which are the two pins I have it connected to. I used the method outlined here.

tekktrik commented 1 year ago

Update: my previous response here was incorrect. See the comment by @Neradoc below. You can follow this guide for getting CircuitPython set up on your microcontroller and downloading this library to try it out, if you want to try using CircuitPython, which will give you access to the CircuitPython rtc library. If you want to stick with MicroPython, see below:

Neradoc commented 1 year ago

It looks like you are using blinka on Micropython. Blinka does not implement the rtc module, you will want to look up how to set the time in Micropython, ask on their forums or other places.