The project focus on using Raspberry Pi to create light effect driven by the music.
Step 1: Prepare LEDsConnecting the LED directly to Raspberry Pi would damage the diodes. We will use 330 ohm resistors to secure our LEDs. Some LED modules came with resistor build into the module, you can skip than the additional resistor. The cathode (-) of the LED we will connect to the resistor. Than each resistor we connect to common GND (-) line on the breadboard.
Note that: In general, there is no difference if you connect resistor on the anode(+) or cathode(-) site of the LED.
Note that: It is important that each LED has own resistor, because most of the resistors sold has top current limit 0.25 W.
Step 2: Connect Raspberry Pi
Step 2: Connect Raspberry PiUsing the rainbow jumper cables or any other cable you have. First connect breadboard GND line to Raspberry Pi GND gold pin. Next connect the anodes(+) of the each LED to appropriate gold pin(GIPO) on the Raspberry Pi so we can control them independently.
Note that: It is good practice to connect GND first.
Step 3: Connect Microphone
Step 3: Connect MicrophoneYou can use any available microphone. I used USB microphone for this project, but the standard jack 3.5" microphone works the same. The program will select any available microphone. Make sure in Raspberry OS that the microphone is detected.
Step 4: Run the program
Step 4: Run the programOpen the python IDE on the Raspberry Pi and paste attached code.
TroubleshootingAt this point, when the boards are plugged in, you should see the lights from the LEDS, and the hear the tone from the speaker. If something isn't working as expected, here are some good places to start:
- check to make sure each of the components are wired correctly - positive/negative in the right spot, according to the schemat attached to this project,
- make sure that Raspberry Pi is connected to power,
- check if the memory card with Raspberry OS is not corrupted,
- make sure the code was copied and nothing was accidentally deleted or added,
- if problem persists, you can contact me by "contact" button below.
Thank you for reading. If you are interested in seeing future projects, please subscribe to my YouTube channel: Trogon Studios.
Enjoy!
Comments
Please log in or sign up to comment.