RTTTL player library for Arduino.
Links:
Features:
::
//#include <Tone.h>
// if Tone.h is included before this include,
// then the external Tone library is used
// else the core tone()/noTone() functions.
#include <rtttl.h>
const int pinSpeaker = 13;
const int octave = 0;
const char song_P[] PROGMEM = "Indiana:d=4,o=5,b=4000:e,8p,8f,8g,8p,1c6";
Rtttl player;
void setup(void)
{
player.begin(pinSpeaker);
player.play_P(song_P, octave);
}
void loop(void)
{
}
http://arduino.cc/en/Guide/Environment#libraries
install the library::
python -m confduino.libinstall https://github.com/ponty/arduino-rtttl-player/zipball/master
::
sudo apt-get install arduino
sudo apt-get install python-pip
sudo pip install confduino
sudo python -m confduino.libinstall https://github.com/ponty/arduino-rtttl-player/zipball/master
::
sudo python -m confduino.libremove rtttl
.. _arduino: http://arduino.cc/ .. _python: http://www.python.org/ .. _simavr: http://gitorious.org/simavr .. _RTTTL: http://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language .. _confduino: https://github.com/ponty/confduino .. _Tone: http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation .. _example: http://code.google.com/p/arduino-tone/source/browse/trunk/examples/RTTTL/RTTTL.pde