RV3028 on a Motor 2040

I am new to Pico and the Motor 2040. I would like tobe able to get the RTC to run on the Motor 2040. I have done a bit of googling on the subject but no luck. Is it even possible to get time onto the Motor 2040. I have two motors doing what I want be no luck with the RV3028. Any pointers appricated

Your adding the RTC to the Pico, not the motor shim. Think of it that way and it may be easier to sort out. I have one wired up to a Pico Lipo via i2c.
You’ll need to setup i2c.
I used pins 4 and 5 as those are the pins used by the Qw/ST connector on my Pico Lipo.

from pimoroni_i2c import PimoroniI2C
i2c = PimoroniI2C(sda=(4), scl=(5))

Then you need to setup the RV3028.

import time
from breakout_rtc import BreakoutRTC

I also added the following code from one of the examples, and so far mine works and keeps accurate time. I’m not 100% sure its needed though?


The above code is all in the section above the while true loop.
Raspberry Pi Pico GPIO Pinout

If you don’t want to do any soldering etc. You’ll need one of these,
STEMMA QT / Qwiic to Breakout Garden Adapter - Pimoroni
And a JST-SH to JST-SH cable.
JST-SH cable - Qwiic / STEMMA QT compatible - Pimoroni

Hi, this is me again and I got the RTC working (crudely but working).

Thanks for the help.

1 Like

Nice to hear you got it working. =)

The set time example should set it based on the time on the host PC. It’s a quick and easy way to set the date and time to your time zone. Assuming the host PC is setup that way that is.
pimoroni-pico/micropython/examples/breakout_rtc at main · pimoroni/pimoroni-pico · GitHub

I ran it on my Pi 400 in Thonny and it was easy peasy.