The place where random ideas get written down and lost in time.
2023-01-28 - ESP32: MicroPython
Category DEVIn the same vein that I tried Rust & TinyGo using the “Software Defined Blocks” project as an excuse, we’re going to restart all over again but this time with MicroPython.
Links for MicroPython:
- https://docs.micropython.org/en/latest/esp32/quickref.html
- esp32 module: https://docs.micropython.org/en/latest/library/esp32.html#module-esp32
- There’s access to the NVM and a few other hardware centric properties.
- threads: https://docs.micropython.org/en/latest/library/_thread.html [tutorial]
However:
- FreeRTOS is used and pinned to core 0.
- Micropython is pinned to core 1, including all threads.
For SDB, it is expected that some of the camera/vision part will have to be written in C, and then made available to MicroPython as a module. The goal is to never make image processing in Python; instead MicroPython will be the glue e.g. to get images from a driver/module, and pass around to an analyzer module.
One thing I tried in the past is this customized version of MicroPython with the OV driver. https://www.google.com/search?q=micropython+esp32-cam for more links.
https://github.com/lemariva/micropython-camera-driver specifically of interest.
This rebuilds uPy with a dedicated camera driver.
It can be a good example of how to add C level code to a forked MicroPython.