To add a custom module to the MicroPython firmware for the ESP32
Follow: blog.mmone.de/2019/09/26/howto-build-micropython-for-esp32-on-osx/ to setup a build environment on OSX.
Pass the module to the make command like that:
ESPIDF=<path to IDF> PYTHON2=/usr/bin/python USER_C_MODULES=<path to module> make all