I am using the Adalogger FeatherWing with the Feather RP2040.
I loaded the example, pcf8523_simpletest.py and the library, adafruit_pcf8523.py.
I ran the example.
This gave me a timeout in the main loop, so I added a sleep(1) before the main loop.
This worked, and it displayed the preset DateTime. So far, so good.
I changed if False: to if True: so I could set the time.
I edited: t = time.struct_time((2021, 11, 21, 17, 55, 0, 0, 0, 0))
I ran the example and got this message.
# ======== Quote ======
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Setting time to: struct_time(tm_year=2017, tm_mon=10, tm_mday=29, tm_hour=10, tm_min=31, tm_sec=0, tm_wday=0, tm_yday=-1, tm_isdst=-1)
Traceback (most recent call last):
File "code.py", line 33, in <module>
File "/lib/adafruit_pcf8523.py", line 177, in datetime
File "adafruit_register/i2c_bcd_datetime.py", line 69, in __get__
File "/lib/adafruit_bus_device/i2c_device.py", line 125, in write_then_readinto
OSError: [Errno 19] Unsupported operation
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Feather RP2040 with rp2040
#========== End Quote ===========
Note: line 33 is t = rtc.datetime
I considered that I may have corrupted the clock by writing invalid parameters,
so I disconnected the battery (several minutes) and restored the parameters back to those in the example.
I still get this error! Remember, this worked earlier.
Any suggestions?
P.S. What does the reset button do?
Gary Minor
Adalogger FeatherWing pcf8323 error
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Adalogger FeatherWing pcf8323 error
Please post a photo of your setup showing how everything is connected. The timeout you got when running the original example seems odd. Should just work.
- GaryMinor
- Posts: 22
- Joined: Mon Mar 22, 2021 10:13 am
Re: Adalogger FeatherWing pcf8323 error
The feather rp2040 is connected to the adalogger feather wing by direct connection. That is by piggyback headers. No wires! I have used both the pi-4 and a windows 10 host. Remember, this worked the first time. It failed after I tried to write to it. I may have used invalid parameters. I have rewritten the original parameters. This seems to have worked.
- GaryMinor
- Posts: 22
- Joined: Mon Mar 22, 2021 10:13 am
Re: Adalogger FeatherWing pcf8323 error
I have flash reset, then reflashed the circuitPython for feather. Then reloaded the example code and the drivers. Same response.
- GaryMinor
- Posts: 22
- Joined: Mon Mar 22, 2021 10:13 am
Re: Adalogger FeatherWing pcf8323 error
It now works!! Somehow I may have messed with the example.py code and caused the problem.
Please be positive and constructive with your questions and comments.