dr-mod/pico-solar-system

Support for MicroPython 1.19 to include Pico W

ae5au opened this issue · 3 comments

ae5au commented

https://github.com/ae5au/pico-solar-system

I've created a fork with support for the latest Pimoroni build of MicroPython 1.19 including the new PicoGraphics framework. It also supports the Pico W...eventually using ntp to sync time removing the need for an RTC if using somewhere that has Wi-Fi.

Please take a look and let me know if you have a chance to try it out. I have some more changes to make and would like some feedback before submitting a PR.

Requires installing v1.19 or later from Pimoroni:
https://github.com/pimoroni/pimoroni-pico/releases/

ae5au commented

I thought NTP was working as part of the Pico W networking support, but turns out that was Thonny setting the time from my workstation!

ae5au commented

UPDATE: I now have NTP working using the example ESP8266 module code from MicroPython with a slight modification.

Still needs error handling for Wi-Fi and the NTP process.

ae5au commented

I added error-handling and retry for Wi-Fi and NTP connections. Time is only set at startup just like the current RTC support. Possible future enhancements could be:

  • Re-check NTP (or RTC) periodically
  • Allow for local timezone (preferably honoring DST where applicable)
  • Logging Wi-Fi connection status to display during startup.

PR #14 submitted.