Feather M0 Express Arduino IDE Setup

We'll upload the code to the Adafruit Feather M0 Express using the Arduino IDE. We'll need to have the Adafruit board profile and libraries installed before uploading the code. If you're new to Arduino, let's first walkthrough the board profile setup using the Adafruit Feather M0 Express guide.

Installing Libraries in Arduino

With the board profile, we can then install the dependencies. We'll use Arduino's built-in Library Manage to install the libraries. Goto Sketch > Include Library  and select Manage Libraries. Here, we'll search for the Adafruit ST7735 Library and install the latest version.

Uploading Code

With the Feather board profile and Arduino library installed, download the Joy.ino file and the graphics.h file and save them to a new folder named "Joy". You'll want to place the new folder into arduino's sketches folder (ie. ~/HD/Documents/Arduino/sketches). 

Open the Joy.ino file in the Arduino IDE. Select the Adafruit Feather M0 Express board under the Tools > Board menu. Connect the Feather board to your computer via microUSB cable and select "/dev/cu.modem..." under the Tools > Port menu (Option might be named different using Windows OS).

Upload the code to the Feather using the Upload command, Cmd+U or clicking the arrow icon.

Changing Key Mappings

The button array lists the pins mapped to specific keyboard characters. Depending on the wiring, the buttons will be mapped to analog pins A2-A5, respectfully.

You can modify the keys by updating the values in the single quotes ('x') and the KEY_XX arguments. For special characters like return, esc and function keys, reference the Arduino Key Modifiers page here.

} button[] = {
  { A5, KEY_HOME },         // Button 0 Blue
  { A4, KEY_RETURN },       // Button 1 Pink
  { A3, 'x' },              // Button 2 Yellow
  { A2, 'z' },              // Button 3 Green
  { 11, KEY_ESC },          // Joystick select click
};
I suggest having the code uploaded to the Adafruit Feather before wiring the components. 

This guide was first published on Oct 04, 2017. It was last updated on Mar 08, 2024.

This page (Software) was last updated on Mar 08, 2024.

Text editor powered by tinymce.