How to Control Buzzer On and Off with Micro:bit?
Overview
In this project, you will learn how to generate a sound with keyestudio digital active buzzer module. In this lesson we will look to control the buzzer on and off circularly.
Component Introduction
Keyestudio Digital Buzzer Module:
It is the simplest sound making module. You can use High/Low level to drive it. Changing the frequency it buzzes can produce different sounds.
Buzzers can be categorized as active and passive ones. The difference between the two is that an active buzzer has a built-in oscillating source, so it will generate a sound when electrified. The buzzer on this module is an active buzzer. This module is widely used in our daily appliances like PC, refrigerator, telephones, timers and other electronic products for voice devices. etc.
Component Required:
-
Micro:bit main board*1
-
Keyestudio Micro bit Sensor V2 Shield*1
-
USB Cable*1
-
keyestudio Digital Buzzer Module*1
-
Dupont jumper wire*3
-
Premium Battery Holder 6-cell AA*1
-
1.5V AA Battery*6
Connection Diagram
Test Code
Test Results
Done wiring and powered up, send the code to micro:bit, you should hear the buzzer module sound and then stop, circularly. It seems like the sound is interrupted.