Working from the OSEPP 201 Kit Series Arduino Basics, this tutorial uses two-dimensional arrays to store the notes in the melody and their duration, then uses the Tone function to play it.
Background on the Tune
The tune is Shave and a Haircut, which is popular in the US and has a long history often associated with comedy. My apologies to any Mexican readers who may find the tune offensive, that is not my intent.
Resources
Arduino Starter Kits
If you’re interested in getting started with microcontrollers, an Arduino Basics Kit is a great place to start. Check out these items:
Links
- Tone Tutorial on Arduino.cc
- Pitches.h