Software

Setup Adafruit Feather M0 for CircuitPython

Your Feather M0 should already come with CircuitPython but maybe there's a new version, or you overwrote your board with Arduino code! In that case, see the below for how to reinstall or update CircuitPython. Otherwise you can skip this and go straight to the next page.

CircuitPython Libraries

Install the Adafruit NeoTrellis library for Circuit Python by downloading the latest bundle. Unzip the file and locate the NeoTrellis library. Drop the library into a folder named "lib" on the CIRCUITPY drive.

For non-express boards like the Trinket M0 or Gemma M0, you'll need to manually install the necessary libraries from the bundle:

  • adafruit_neotrellis
  • adafruit_seesaw
  • adafruit_bus_device

Before continuing make sure your board's lib folder or root filesystem has the adafruit_seesaw, adafruit_neotrellis, and adafruit_bus_device files and folders copied over.

Upload The Code

Copy and paste the code below into a new text document (we recommend using Mu as your editor, which is designed for CircuitPython.). Save the file and name it as main.py

Once the files has been uploaded to the drive, the board will automatically reboot and run the code.

NeoTrellis Demo

This is a modified version of the Circuit Python NeoTrellis demo code. On start, the NeoPixels run through a wipe animation. On press down, the buttons will light up white. On release, the NeoPixel will light up in a random color. Press and holding the reset button while pressing any of the elastomer buttons will reset the grid and light up that button in a random color. This makes for a simple color matching game – The point of the game is to match all of the button colors to the first pixel.

This guide was first published on Oct 09, 2018. It was last updated on Oct 09, 2018. This page (Software) was last updated on Sep 18, 2019.