Learning Projects; Playing Music - Keyestudio Micro:bit Mini Smart Robot Car Manual

Table of Contents

Advertisement

www.keyestudio.com

8. Learning Projects

8.1 Playing Music

1) Description
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.
A passive buzzer does not have such a source, so DC signal cannot drive it beep. Instead, you need to use
square waves whose frequency is between 2K and 5K to drive it.
Different frequencies produce different sounds. You can use micro:bit to code the melody of a song, quite fun
and simple.
The keyestudio Micro:bit robot shield comes with a passive buzzer element. The signal terminal of buzzer is
connected to the P9 interface of micro:bit main board.
19

Advertisement

Table of Contents
loading

Table of Contents