Papa Soundie Audio Player Hookup Guide
Programming
Preparing your microSD Card
Format your microSD Card. The Papa Soundie works with FAT12, FAT16, and FAT32 disks. Load the files you wish to play using the naming convention shown in the previous section. Once the card is inserted you are almost ready to play.
Arduino Library
Within the Arduino IDE, the set up is the same as for the Pro Mini. Under the Tools menu choose the following for the board:
- Board: Arduino Pro or Pro Mini
- Processor: ATmega328P (3.3V, 8 MHz)
To get started immediately, use the example code and library files below.
Library Overview
These are functions used to setup the pins at startup and to play and stop audio playback.
PapaSoundie::begin()
- Sets GPIO as output, turns on the VLSI IC, turns on the status LEDs. Must be called in setup()
.
PapaSoundie::playFileNumber(int number)
- Plays the audio file associated with the number.
PapaSoundie::playRepeat(int number)
- Plays the audio files associated with the number repeatedly.
PapaSoundie::stopRepeat()
- Stops playback of repeat function.
Install FTDI Drivers
To upload with an FTDI, make sure the FTDI drivers installed. Depending on your computer’s operating system, you will need to follow specific instructions. Please go to How to Install FTDI Drivers, for more information.
How to Install FTDI Drivers
June 4, 2013
Example Sketch
Copy and paste the following code into the Arduino IDE. Hit upload, and see what happens! Make sure to select the correct board and COM port when uploading.
language:c
/*
Papa Soundie Hookup Guide: Software Example
Mary West @ SparkFun Electronics
4/16/2018
:)
This sketch will sequentially play audio files from a list of 12 stored on
the SD Card every 5 seconds.
This code is released under the MIT License (http://opensource.org/licenses/MIT)
******************************************************************************/
#include "SparkFun_PapaSoundie.h"
PapaSoundie sfx = PapaSoundie();
void setup() {
sfx.begin();
Serial.begin(115200);
}
// the loop function runs over and over again forever
void loop() {
for(int i = 0; i < 12; i++)
{
Serial.print("Playing: ");
Serial.println(i);
sfx.playFileNumber(i);
delay(5000);
}
}
sfx
is the constructor to instantiate the PapaSoundie class. You can name this constructor whatever you'd like.