Skip to content

Instantly share code, notes, and snippets.

@mpflaga
mpflaga / MP3sequence.ino
Last active February 10, 2016 16:09
Simple example of playing a sequence of tracks.
// libraries
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>
// initialize MP3 card
SdFat sd;
SFEMP3Shield MP3player;
byte result; // variable for mp3 player shield, can be used to debug
@mpflaga
mpflaga / MP3random.ino
Last active August 23, 2016 21:25
Simple example of playing random tracks.
// libraries
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>
#define NUMBER_OF_TRACKS 5
// initialize MP3 card
SdFat sd;
// libraries
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>
// initialize MP3 card
SdFat sd;
SFEMP3Shield MP3player;
// constant variables
@mpflaga
mpflaga / froggy14_MP3_PIR.ino
Last active February 10, 2016 16:12
Froggy14's code with corrections as to allow it to get compiled.
// libraries
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>
// initialize MP3 card
SdFat sd;
SFEMP3Shield MP3player;
@mpflaga
mpflaga / FileNamePlayer.ino
Last active December 16, 2015 00:59
This sketch listens for commands from a serial terminal which are TERMINATED with New Line Feeds (aka "\n" or 0xA). To use this sketch enable Serial Monitor to use NewLine's. If the Serial message is 1 byte in length and terminated by LF, the byte will be processed as menu command. If the Serial Message is larger than 1 byte it will assumed a Fi…
/**
* \file FileNamePlayer.ino
*
* \brief Example sketch of using the MP3Shield Arduino driver
* \remarks comments are implemented with Doxygen Markdown format
*
* \author Michael P. Flaga
*
* This sketch listens for commands from a serial terminal which are TERMINATED
* with New Line Feeds (aka "\n" or 0xA). To use this sketch enable Serial
@mpflaga
mpflaga / TrackPlayer.ino
Last active December 16, 2015 00:49
This sketch listens for commands from a serial terminal (such as the Serial Monitor in the Arduino IDE). Listening for either a single character menu commands or an numeric strings of an index. This sketch allows the various file formats to be played: mp3, aac, wma, wav, fla & mid. This sketch behaves nearly identical to MP3Shield_Library_Demo.i…
/**
* \file TrackPlayer.ino
*
* \brief Example sketch of using the MP3Shield Arduino driver
* \remarks comments are implemented with Doxygen Markdown format
*
* \author Bill Porter
* \author Michael P. Flaga
*
* This sketch listens for commands from a serial terminal (such as the Serial
/***
InputCapture.ino
Timer 1 high-resolution timing facility.
Copyright (C) 2008-2012 Bill Roy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either