Sample Code and Audio Files

The Arduino sketch to operate the clock along with the audio files are all available in a GitHub repository at You can click on that link or click the green button below to directly download a ZIP file containing the files. This repository also contains the 3D model of this project in Fusion 360 format as well as STL files for 3D printing the case.

Download the repository and unzip it. Insert a formatted micro SD card into your computer and drag-and-drop the contents of the "audio_files" folder onto the root directory of the card. Do not drag the "audio_files" folder itself… just its contents. There are over 90 files totaling about 25 MB of data. When the files are copied, safely eject the microSD card and insert it into the Music Maker Wing. It is safer to do this with the power disconnected. After the card is in place, connect a USB and open the "clock.ino" sketch in your Arduino IDE. Do not upload it immediately because there is some configuration that you have to do first.

There are six tabs for the six files of this program. The first tab is "clock" containing the main program. Below is a partial listing of the beginning of that file. You should edit it to configure which options you have implemented. Use a "0" to disable the particular option or "1" to enable it.

Download: file
 * Talking Musical Neo-Pixel Clock with Infrared, BLE, and Touch Controls
 *    by Chris Young
 *  released to the public domain
//Various options. Set to zero to disable or one to enable.
//Enables Serial Monitor Debugging
#define MY_DEBUG 0

//Enables Bluetooth controls must use Feather M0 BLA if enabled.
//If disabled, can use Feather M0 basic or M0 express
#define USE_BLE 1

//Enables IR controls. Must connect IR receiver to a digital input pin
#define USE_IR 1

//Enables audio output. Requires Music Maker Feather Wing
#define USE_AUDIO 1

//Enables photocell

//Enables Touch Controls
#define USE_TOUCH 1

Once you have configured the sketch for the options you have implemented, compile and upload the sketch. If you get compiler errors, it is likely that you have not properly installed one of the required libraries.

When the system initializes you should hear a voice say "System Initialized… Right channel test… Left channel test". You should hear the first phrase from both speakers. The other phrases in only one speaker. This will allow you to verify that both speakers are working. If you're using the BLE option, after a few seconds you will hear "BLE initialized".

The clock initializes to 12 noon. The hours are depicted by a set of five blue or cyan colored pixels. Blue pixels indicate a.m. and cyan colored pixels indicate p.m. The minutes are depicted by a red pixel. The seconds are indicated by a moving green pixel. In the next section we will describe how to set the time and configure other options using the voice prompt setup menu.

NOTE: If you are using the touch controls, you may need to calibrate them. See the section on "Advanced Configuration" for details on how to do this.
This guide was first published on Jul 30, 2018. It was last updated on Jul 30, 2018. This page (Sample Code and Audio Files) was last updated on Jul 29, 2018.