Arduino tone()

By using Arduino tone() function in combination with a small piezo element it is easy to produce some tones and sounds. Once single tone frequencies are known you can make some musik.

In this small project I used a NodeMCU ESP8266 to program the beginning of Super Marios soundtrack. Just Connect the piezo element to ground and D1 and it will work. Make sure that the element is not in touch with other objects since this will lead to some inconvinient noises.
The tone functions receives a pin, frequency and duration parameter.
Code can be downloaded here have fun!

SuperMario (155 Downloads)