Your shopping cart is empty!
Lesson 2 : Buzzer & Buttons
- Abdul Salam A Haris
- 09 Mar 2023
- Tutorial
- 332
The buzzer and buttons that are already integrated into the CM4 Maker Board are just one of its many fascinating features. From making customizable control panels for your smart home gadgets to designing musical instruments, these components can be used in a variety of various projects and applications.
Three programmable buttons on the board are linked to GPIOs 17, 22, and 27. This enables you to quickly assign unique functionalities to each button, enabling you to design a user interface for your project that is entirely unique. A useful instrument for producing sound effects or music is the passive piezo buzzer, which is connected to GPIO 19. It can play tones and melodies.
Use the included sample code to play a new sound on each button press to get the buzzer and buttons working.
This code can be easily expanded and adjusted to meet your unique needs. It is intended to help you become familiar with the fundamental capabilities and features of the buttons and buzzer.