piezo sounder
piezo sounder
Let's learn how to make our Arduino produce simple sounds using a piezo sounder. Adding alarms, warning beeps, and alert notifications to our projects is a great way to make them more interactive and informative, and the command tone() has simplified creating tones.
We'll also learn how to use the piezo as a sensor to read data from it and pick up the basics of reading analog sensors. By looking at a light sensor and learning how to make simple sounds, we'll learn how to use the tone() command to create a simple alarm, quite similar to a car alarm.