RGB LED corresponding with LED's

I am having trouble trying to figure out a code to make an RGB LED a certain color in conjunction with a separate LED. for example: red, light up with a red LED when using a potentiometer.

Thanks :slight_smile:

What's your problem - hardware or software?

RGB LEDs are made up of 3 regular LEDs in one package, that's why they have 4 lead, one common, and 3 for red, green and blue. If you already have regular (non-rgb) LEDs working in the circuit, you should be able to wire up each lead of the RGB LED to the circuit that's already driving the standard LED of that color, as in, hook the lead that controls red to the lead for the red in the RGB LED.

When wiring up an RGB LED, don't think of it as a single LED, instead, think of it as 3 seperate LEDs with a common cathode (or anode depending on the type of RGB LED).