Arduino Play a Melody

Play a Melody using the tone() function with Arduino

This example shows how to use the tone() command to generate notes. It plays a little melody you may have heard before. Circuit image developed using Fritzing. For more circuit examples, see the Fritzing project page Connect one terminal of your speaker to digital pin 8 through a 100 ohm resistor. Connect the other terminal to ground. […]

Play a Melody using the tone() function with Arduino Continue Reading