- M5 Stamp-C3U - ESP32-C3 MCU module
- SparkFun Qwiic Alphanumeric Display - Blue
- Grove to STEMMA QT / Qwiic / JST SH Cable - 100mm long
- PyCharm
- MicroPython plugin
- Google Blockly is used to edit and run display programs online.
- The blocks are converted to JavaScript code to be run in the browser window
- The blocks are converted to MicroPython code to be run on MCU side
- GitHub pages hosts the web part
- EMQ Free Public MQTT Broker helps to exchange data between web- and hardware- part
- MicroPython is run on the ESP32 MCU and handles both the display and MQTT connection
- HT16K33 Python driver
- micropython-mqtt
- Solder the Grove connector (shipped with the module) to M5 Stamp-C3U Port A
- Connect the display module to the MCU module
- Connect the MCU module to your computer with USB cable. A COM port should appear
- Flash latest MicroPython to the MCU module. JS ESPTool is a handy tool for it. Note that .bin file should be flashed at address 0x0000
- Create a (free) account at a public MQTT broker (ex https://www.hivemq.com/, https://www.emqx.io/)
- Create your own cloud MQTT broker
- Create an MQTT user. NB! Create a strong password and keep it well, otherwise your WLAN may be hacked!
- Write your own SECRETS.py file based on the template secrets_template.py. There should be your specific Wi-Fi SSID, Wi-Fi password, and MQTT lo.
- Upload newly created SECRETS.py to the MCU module filesystem. You may use either PyCharm with MicroPython plugin, Thonny, or mpremote
- Upload MicroPython code to the MCU board. The tools are above
- Reboot the board
- Open elmot.xyz/esp32-blockly-display/
- Click gear icon and enter your MQTT parameters, same as in MicroPython part
- If everything is done correctly, The board connects to the MQTT broker
- Wi-Fi sign on the web page turns to be dark green
- On-Board LED turns green after several seconds
- Blue blinking => Wi-Fi connection in progress
- Red steady => Wi-Fi connection failed
- Yellow steady => MQTT connection in progress
- Green steady => MQTT connection established
Blocks are stored to browser's local storage.