This is an example of using the tone () function on an Arduino Nano. In the same way you can apply other Arduinos and the like