Skip to content

micropython + html + mqtt + blockly + m5spamp-c3u + Sparkfun Alphanumeric display = fun

License

Notifications You must be signed in to change notification settings

elmot/esp32-blockly-display

Repository files navigation

4-Letter 14-Segment indicator toy

device view

screenshot

Hardware

Software & SaaS services

How2Run

  1. Solder the Grove connector (shipped with the module) to M5 Stamp-C3U Port A
  2. Connect the display module to the MCU module
  3. Connect the MCU module to your computer with USB cable. A COM port should appear
  4. 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
  5. Create a (free) account at a public MQTT broker (ex https://www.hivemq.com/, https://www.emqx.io/)
  6. Create your own cloud MQTT broker
  7. Create an MQTT user. NB! Create a strong password and keep it well, otherwise your WLAN may be hacked!
  8. 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.
  9. Upload newly created SECRETS.py to the MCU module filesystem. You may use either PyCharm with MicroPython plugin, Thonny, or mpremote
  10. Upload MicroPython code to the MCU board. The tools are above
  11. Reboot the board
  12. Open elmot.xyz/esp32-blockly-display/
  13. Click gear icon and enter your MQTT parameters, same as in MicroPython part
  14. 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

On-board led statuses

  • Blue blinking => Wi-Fi connection in progress
  • Red steady => Wi-Fi connection failed
  • Yellow steady => MQTT connection in progress
  • Green steady => MQTT connection established

Technical details

Blocks are stored to browser's local storage.