Arduino library to play RTTTL melodies
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs arduino 1.0.3 support Feb 10, 2013
rtttl Made compliant with latest Arduino/AVR standards. Dec 5, 2015
simulator formatting by autopep8 Dec 3, 2012
tests formatting by autopep8 Dec 3, 2012
.gitignore start Nov 1, 2012
README.rst fix doc Feb 10, 2013
doxy.ini start Nov 1, 2012
pavement.py simplified pavement tasks Mar 17, 2013

README.rst

RTTTL player library for Arduino.

Links:
Features:
  • based on RTTTL example in Tone library
  • hardware: check Tone library
  • blocking mode only
  • song can be either in PROGMEM or RAM
  • support for both internal and external improved Tone library
  • build tests
  • examples
  • library size calculation
  • simulation
  • API documentation with doxygen
  • header only library
  • supported Arduino versions: 0022, 1.0

Basic usage

//#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)
{
}

Manual Installation

http://arduino.cc/en/Guide/Environment#libraries

Automatic Installation

General

  • install arduino

  • install confduino

  • install the library:

    # as root
    python -m confduino.libinstall https://github.com/ponty/arduino-rtttl-player/zipball/master
    

Ubuntu

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

Ubuntu uninstall

sudo python -m confduino.libremove rtttl