I first intended this to be an LED clapper, where if I clapped, an LED or two would turn on. However, that idea quickly escalated into a sound visualizer, that would show the sound level of a room and turn on and off the onboard LED on the RP2040 Connect. I also had the RP2040 Connect send data to the Arduino Cloud to display the sound level data on a graph.
Notes:
- This project can only be used with the Arduino Nano RP2040 Connect since it is the only IoT board Arduino currently has that has an onboard microphone.
- Link to Arduino's Getting Started guide for Arduino IoT Cloud if you need: https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started
1. Place the RP2040 Connect board on your breadboard with the micro-USB facing outwards
2. Place 3 Green, 2 Yellow, and 2 Red LEDs on the other side of the breadboard as shown below. These LED colors represent zones; green being low, yellow meaning medium, and red meaning high.
3. Connect each LED to digital pins 3-9 on the RP2040 Connect to be individually controlled
4. Connect the cathodes of the LEDs with 220-ohm resistors to the ground line of the breadboard and connect the ground line to a GND pin on the RP2040 Connect
5. Create the following variables in a thing on Arduino's IoT Cloud
Class Variable
- CloudLight LED
- float Sound_Level
6. Configure your RP2040 Connect board to the thing and enter your network credentials in the field below
7. Open your Thing's sketch in the Sketch tab and copy the code featured below (Comments are featured in the code to explain how it functions). Then, upload it to your RP2040 Connect
8. Go to the dashboard tab in IoT Cloud and create a dashboard. Next, create widgets (the things in the picture below that control the variables) and link them to each variable. You do not need to have the same widget as me, but can configure your dashboard to look as you like as I only have a graph linked to the Sound_Level variable
Reload your dashboard and your project should be working. Congratulations! If you have any questions, problems, or advice, please comment below and I will get back to you as soon as possible.
A demonstration of this project is below.
Thanks for Reading!








Comments