2.10 Active Buzzer¶
In this lesson, you will get to know about active buzzer. As a type of electronic buzzer with an integrated structure, active buzzer is supplied by DC power, widely used in computer, alarm, electronic toy, telephone, timer and other electronic products or voice devices.
In this example, we use the digital pin 9 to drive the buzzer and extend the cathode of the Buzzer to GND and its anode to the digital pin 9.
When you finish uploading the codes to the Mega2560 board, you can hear the beep—beep emitted from the buzzer. If you want to know more about the detail code explanation, please refer to Part 1-1.2 Digital Write.