Creating a Bluetooth RGB LED light with sound
In the final project of this chapter, the Blockly code used in the previous activity will be used to operate an active piezo buzzer. When you send an ON text message using the Nordic Semiconductor nRF toolbox, the M5Stack Core will turn on the red LED bar, along with blaring an active piezo buzzer. Conversely, sending an OFF text message will turn off the red LED bar and the piezo buzzer. The jumper wire harness provided in Figure 7.26 will be modified by using two wires instead of three. The second standard connector-based jumper is not required for this project. One unique change to the digital output pin 26 is the attachment of a tactile pushbutton switch wired in series with the active piezo buzzer. Figure 7.30 shows an electrical wiring diagram of the tactile pushbutton switch-activated active piezo buzzer circuit:
Figure 7.30: M5Stack Core2 tactile pushbutton switch-activated active piezo buzzer circuit
...