Summary
Highlights
Additive color, based on red, green, and blue light, allows for mixing different intensities to create nearly any color. RGB LEDs combine these three colors in a single package with four legs – one for each color and one for power or ground.
In Tinkercad Circuits, add an RGB LED and connect it with three resistors to three PWM-capable Arduino pins (marked with a tilde). Physical builders can follow a similar breadboard setup for consistency.
Use the code blocks editor to control the LED. Drag an RGB LED output block, set the pins, and choose a color. Start the simulation to see the effect. If the color is off, swap two color pins in the wiring or code. The underlying text editor code uses analogWrite() to set brightness for each color pin, blending them to create various hues, similar to how TV pixels work.
Duplicate RGB output blocks and add pauses to create colorful light shows or sequences. The 'repeat' block can be used for recurring effects. For physical circuits, wire an Arduino Uno and RGB LED, then copy the generated code into an Arduino sketch or download it.
Once comfortable with RGB LEDs, you can advance to animating addressable pixels or creating LED diffusers with materials like ping-pong balls. The next step in your Arduino journey is learning to detect input with pushbuttons and digitalRead().