I got inspired by a Youtube video from Dave's Garage and wrote an analog clock display for the 64x32 LED display. This display works pretty well but I have a couple improvements I cant work out.
1) My board fails to connect to the wifi sometimes. I've adding some hackish code which will loop up to 3 times. I was wondering if there are better ideas.
2) My main event loop uses a sleep between display updates. There is a lot of flicker if the sleep is removed.
3) The get_local_time() function is very useful and saved lots of manual coding. Is there a list of cool/useful library functions?
Here is an obligatory picture of the clock.
Matrix M4 Portal clock project and question
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Matrix M4 Portal clock project and question
Cool clock.
Which version of CircuitPython are you running and what date for the library bundle?
Are you able to grab the network disconnect cause from the REPL console? It can be due to AP being unreachable, running out of sockets or DNS server timing out just to name a few reasons.
to this:
You generally need a sleep or delay of some type when updating the display so the LEDs stay on for a minimal enough time to not have a flicker effect. The display will be constantly redrawing without a sleep.
There might be some other helpful functions for you in the API Reference of the adafruit_matrixportal library.
https://docs.circuitpython.org/projects ... en/latest/
Which version of CircuitPython are you running and what date for the library bundle?
Are you able to grab the network disconnect cause from the REPL console? It can be due to AP being unreachable, running out of sockets or DNS server timing out just to name a few reasons.
Code: Select all
except ConnectionError as e:
print("could not connect to AP, retrying: ", e)
continue
Code: Select all
except (ValueError, RuntimeError, ConnectionError, OSError) as e:
print("Failed to get data, retrying...\n", e)
continue
There might be some other helpful functions for you in the API Reference of the adafruit_matrixportal library.
https://docs.circuitpython.org/projects ... en/latest/
Please be positive and constructive with your questions and comments.