With a Common Cathode design, the 2nd leg needs to be hooked up to the GND pin and the 1st (red), 3rd (blue), and 4th (green) legs should connect to digital I/O pins ( don’t forget a current limiting resistor for each). ![]() We’re going to start with a Common Cathode circuit + code because it’s more intuitive (and similar to our red LED tutorials) before covering the Common Anode version. Notice how the RGB LED type is clearly labeled. Here are two screenshots of supplier websites ( Sparkfun and Adafruit). It’s called diffused because the epoxy casing is scratchy and not perfectly transparentĪ clear Common Cathode RGB LED from Sparkfun. Instead, consult the supplier website, the datasheet, or experiment with the LED yourself (remember, diodes only work in one direction so as long as you include your current limiting resistors, you should be fine!).Ī diffused Common Anode RGB LED from Adafruit. You cannot tell whether you have a Common Anode or Common Cathode RGB LED by visual inspection. How can I tell if I have a Common Anode or Cathode RGB LED? ![]() So, you drive each individual color leg with a higher voltage source. Here, all three embedded LEDs share the cathode leg.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |