I'm a beginner when it comes to Arduinos, and this is my second project. The problem I have seems to be a common one, but all the troubleshooting I've done hasn't provided me with any results
I am using a Nano 33 BLE, and trying to simply cycle through colors in my standard RGB LED bulb while utilizing a breadboard. I can't seem to get any light to come out of my bulb whatsoever.
Here's what I've tried:
Swapping from 100 ohm resistors to 220 ohm resistors (which I am currently using)
Replacing the bulb
Replacing jumper wires
Trying different ground wiring formats
Trying different pins (currently using D2, D3, and D4; tried D9, D10, D11)
Turning the bulb around 180 degrees, and swapping wiring/resistors accordingly.
Trying different code.
I've tried the "Blink" example with this arduino which has worked fine.
I've attached a picture of the set up. I can absolutely provide more info/pictures if need be. I'll try and check in on this post frequently
Here is my code:
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, HIGH);
delay(500);
digitalWrite(2, LOW);
To try this, I took my blue wire that was connected to the end of the resistor corresponding to the bulbs blue pin, and inputted the other end to the 3.3V on the opposite side of the Nano. I did not change any code.
No result happened for me, bulb still stays unlit.
I have a Nano 33 IOT, I'm going to try and run a second setup with it.
Forget about the Arduino board and the sketch for now. You first need to get the LED to light up with a direct power connection. So just disconnect all the wires connected to the digital pins on your Nano 33 BLE to avoid any chance of accidentally damaging the board while you're experimenting. For convenience, you can use the Nano 33 BLE purely as a 3.3 V power supply.
There are two types of RGB LEDs:
common cathode
common anode
This is referring to whether that lead shared by all three LEDs is connected to their cathodes or anodes. Your wiring of having the common lead connected to ground is correct for a common cathode RGB LED. But the common anode version is just as common, perhaps even more so. For a common anode RGB LED, you need to connect the common lead to 3.3 V and the lead for the color you want to light to ground. So reversed polarity from your current wiring.
So please give that a try and see if the LED lights up.