For Windows:
1. Install Python, Esptool and AmpyIf you have no Python 3 installation on your computer please download the installer from https://www.python.org/downloads/ and execute it. Then install Esptool and Ampy with
> pip3 install esptool
> pip3 install adafruit-ampy
on the command line.
2. Download and Install FirmwareDownload https://micropython.org/resources/firmware/esp32-20220618-v1.19.1.bin. Connect your ATOM Matrix to your computer via USB. If you connect it the first time wait a little until Windows installed the driver. Open the Windows Device Manager and look into "COM & LPT" to find the correct COM port, e.g. COM6. Then install the firmware with
> esptool.py --chip esp32 --port COM6 erase_flash
> esptool.py --chip esp32 --port COM6 write_flash -z 0x1000 esp32-20220618-v1.19.1.bin
Reset your device after the installation is finished.
3. Download and Install LibrariesCreate a folder named lib
on your computer. Download the files cooperative_multitasking.mpy
, font5.mpy
, mqtt.mpy
, mqtt_client.mpy
and neopixel_scroller.mpy
from https://bitbucket.org/amotzek/micro-python/downloads/ into that lib
folder. In the command line navigate to the folder above lib
and then execute
> ampy.exe --port COM6 --delay 3 put lib
to upload the folder to your ATOM Matrix.
4. Edit and Upload main.pyFrom the Code section of this project copy the file main.py
to your computer and fill in your WLAN credentials in line 21, a user name in line 19 and a MQTT topic name in line 49. Execute
> ampy.exe --port COM6 --delay 3 put main.py
to upload the file to your ATOM Matrix.
5. TestIn your browser go to http://www.hivemq.com/demos/websocket-client/. Click the Connect button. Enter the topic name from line 49 into the Topic field. Enter
{ "message": "HELLO!" }
into the Message field. Click the Publish button. Your ATOM Matrix should display HELLO!
now.
Only capital letters A to Z, digits and some other characters can be displayed. For a complete list see the source code of Font5 at https://bitbucket.org/amotzek/micro-python/src/master/src/main/modules/font5.py.
Comments