Porting python-qrcode to MicroPython involved:
- Removing libraries unavailable in MicroPython.
- Rewriting syntax that is unavailable in MicroPython.
- Removing Py2/Py3 cross-compatibility code.
- Removing QR code image generation.
- Rewriting recursive function calls into loops: MicroPython has a much shallower recursion limit than CPython.
- Consolidating all of the code into one file, for easier MicroPython deployment.
Due to memory limitations, I can only create small QR codes on the ESP8266 microcontroller. But I’m getting an ESP32 and a slightly larger screen: I’d like to make a project and video about accepting lightning network payments with the ESP32.