![]() The tone function operating the buzzer takes two arguments: but can take three: First is the Pin number, second is the Frequency – this is in hertz (cycles per second) which determines the pitch of the noise made and third is the Duration – how long the tone plays. Sample Code: MQ2 read sensor data and display on OLED. In this tutorial, we are going to learn how to use Arduino and sound sensor to detect the sound. It can be used to create sound-reactive projects, such as clap-activated lights or a sound-activated pet feeder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |