Skip to content

watchy-community/micropython_playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watchy Micropython Playground

Testing MicroPython with Watchy ESP32 hardware.

Setup

The files inside the upload directory should be copied to your Watchy device after MicroPython has been setup. Installation notes can be found on the Community Wiki.

Config File

The file /upload/src/config.py is used as a configuration/settings file. You should only need to add your trusted wireless networks as tuples, and modify the Open-Meteo arguments. The WorldTimeAPI, which is used for NTP sync, will use the weatherTZ for its own timezone look up as well.

Cross-Compile mpy files

On my Debian 12 system, I ran pip install mpy-cross-v6.1 because I am working with MicroPython 1.21.0. Check the MPY-CROSS github docs for which version to install. Once it was installed, I ran /home/<username>/.local/bin/mpy-cross <filename>.py and it made the MPY file. I first did the font files and replaced the PY files with the MPY files on the Watchy, and it loaded without issues, then I did the lib files as well.

ToDo

  • Fix check_weather function
    • After the Micropython 1.21.0 update, the requests will not reach out to HTTPS sites
  • Clean-up ePaper partial updates
    • Current partial is real grainy and hard to read
    • Peter Hinch has been working on partial epaper updates for the Waveshare Pico, is his code adaptable?
  • Monitor watchy voltages, adjust battery icon ranges
    • Max is 4V (I'm seeing 4.01x or 4.02x)
    • Min is 2.66? - Still monitoring and testing
    • Added ADC width, Mouser docs confirmed 12BIT width
    • Reconfirmed ADC atten, LiPO is 3.3V so 11DB is used
  • Add docstrings to libraries, clean up errors/warnings
    • writer needs docstrings added
    • can display/epaper/writer be refactored/combined/slimmed down?
  • Reduce memory usage
  • Work with others to integrate the v1 and v1.5 hardware code
    • Have both PCF8563 and DS3231 libraries on the watch, load the appropriate driver
    • How to identify v1/v1.5/v2 so we can re-map ADC and BTN3 pins, might need to be a config.py/manual user process
      • Maybe add WATCHY_VERSION to boot.py?

Issues

  • It is not possible to get the wakeup bit in MicroPython yet, see GH: micropython/issues/6981
    • tl;dr: There is a delay in the wakeup process, by the time the ESP32 wakes up the MicroPython bit used to track the individual buttons is lost.

References

Hardware/Datasheets

About

Testing MicroPython with Watchy ESP32 hardware.

Topics

Resources

License

Stars

Watchers

Forks

Languages