How do you tell if RGB LED is common anode or cathode?
Similarly, how do you know if its a common anode or cathode?
If the LED lights up, it is common ANODE. If no segment lights up then you need to reverse the wiring. So swap the two wires over on the battery or supply, if the LED lights up now it is common CATHODE. If the LED has not lit up in either example then it is potentially broken.
Similarly, you may ask, how do you use a common anode RGB LED?
Connect the Common Anode of the RGB LED to Digital Pin - 8 on the Arduino UNO. Connect the 3 cathode legs to 220 Ohm resistor and diode as shown in the circuit diagram. The anode of the diode should be connected to the resistor. Connect the diode legs to ARDUINO UNO Digital Pins- 5, 6 and 7 respectively.
Definition: The anode of a device is the terminal where current flows in from outside. The cathode of a device is the terminal where current flows out. By current we mean the positive conventional current. Since electrons are negatively charged, positive current flowing in is the same as electrons flowing out.