In this recipe, we will learn how to play a beeping tone when the button is pressed. The previous recipes allowed us to interact with light using the buttons. This recipe will show you how to introduce button and sound interactions in your projects.
Playing a beep on the button press
Getting ready
You will need access to the REPL on the Circuit Playground Express to run the code presented in this recipe.
How to do it...
Let's perform the following steps:
- Run the following lines of code in the REPL while keeping push button A pressed:
>>> from adafruit_circuitplayground...