OSError: [Errno 5] EIO - When running rtc.set_time(time.time())
SpoonerUK opened this issue · 1 comments
SpoonerUK commented
I cannot get the RTC to set the time, I don't know what the issue is.
`Entering REPL. Use Control-X to exit.
MicroPython v1.15 on 2021-05-20; Raspberry Pi Pico with RP2040
Type "help()" for more information.
import time
import ds3231
rtc = ds3231.ds3231()
rtc.set_time(time.time())
Traceback (most recent call last):
File "", line 1, in
File "ds3231.py", line 27, in set_time
OSError: [Errno 5] EIO
`
dr-mod commented
Hi, the most probable cause for this is that you Pico can't reach your RTC module. I get the same error if my RTC is not connected.
You could check the connection or replace the module.