Skip to content

Firmware for Arduino Adafruit Matrix Portal M4

Gavin Jancke edited this page Dec 1, 2020 · 12 revisions

The Expressive Pixels firmware for Arduino will run full featured on the Adafruit Matrix Portal M4 board, supporting connectivity and control from the Expressive Pixels authoring application.

Some of the features supported:

  • Live! rendering of animations and authoring from the Expressive Pixels application.
  • Upload and storage of animations on the Matrix Portal M4 flash chip
  • Auto-play of stored animations upon boot
  • Animation triggering from GPIO pins A1, A2, A3, A4

Use existing pre-compiled firmware image

You quickly upload the latest Expressive Pixels firmware image for the Matrix Portal M4 device:

  • Put the device into UF2 Bootloader mode by double clicking the device's Reset button, a Windows File Explorer window will appear.
  • Download the Expressive Pixels for Matrix Portal M4 firmware, and drag it to the Windows File Explorer window.
  • You can now connect to the device using the Expressive Pixels application per section below.

How to build the firmware using the Arduino IDE

(Optional) Create UF2 image from Arduino IDE

To easily flash your device(s) over USB you can create a UF2 file instead of uploading a compiled image from the Arduino IDE

  • In the Arduino IDE, select the Sketch..Export Compiled Binary menu item, this will compile a BIN file in your sketch folder

  • Ensure you have Python installed on your system, and copy uf2conv.py into your system path

  • Run the following command which will produce a UF2 file that you can use with the UF2 bootloader on the device

    uf2conv.py -c -b 0x4000 -o ExpressivePixels-Arduino-MatrixPortalM4.uf2 ExpressivePixels.ino.matrixportal_m4.bin

How to use the Matrix Portal M4 with the Expressive Pixels application

Connecting to the device

With the Matrix Portal M4 plugged into USB, open up the Expressive Pixels application and open the Devices panel, hover over the Matrix Portal M4 device on COMx, and click the Connect button.

Once the device is connected, from within the app you can hover over the animations displayed in My Animations or the Community Gallery and the animations will play on the Matrix Portal display.

Storing animations on the device

When connected, animations can be stored on the device by selecting the ellipsis button for the animation you wish to store, then select Store to device. The stored animations can be viewed and played in the Animations stored on device view.

Triggering animations

Animations can be externally triggered via one of the 4 GPIO inputs available on the Matrix Portal M4 board. Trigger associations can be made through the Developer Console view.

To make an association:

  • Open the Developer Console view
  • Type ? into the text entry bar at the bottom of the view, which will display the available console options
  • To make a trigger association used the SWITCHACTIVATION ADD command, followed by the GPIO pin and the animation name
  • When the GPIO pin is connected to Ground the animation will display on the device.

Bluetooth activation

Bluetooth activation will be enabled on Arduino shortly