All wiring guides

Free wiring guides

Wire the KY-016 RGB LED to the ESP32-C3

RGB LED module, common cathode (KY-016). One light that mixes red, green and blue into any colour.

When buying: The module has its resistors on board. A bare RGB LED needs a 220 Ω resistor on each colour leg.

Which pin goes where

On the partOn the ESP32-C3
RGPIO 5
GGPIO 6
BGPIO 7
GNDGND

Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.

In 3D

Example sketch

// RGB LED module, common cathode (KY-016)
// on the ESP32-C3 Super Mini
// https://stem.manusignal.com/en/parts/ky-016-rgb-led-esp32-c3

const int PIN_R = 5;
const int PIN_G = 6;
const int PIN_B = 7;

void setup() {
  pinMode(PIN_R, OUTPUT);
  pinMode(PIN_G, OUTPUT);
  pinMode(PIN_B, OUTPUT);
}

void loop() {
  analogWrite(PIN_R, 200);
  analogWrite(PIN_G, 0);
  analogWrite(PIN_B, 0);
  delay(700);
  analogWrite(PIN_R, 0);
  analogWrite(PIN_G, 200);
  delay(700);
  analogWrite(PIN_G, 0);
  analogWrite(PIN_B, 200);
  delay(700);
  analogWrite(PIN_B, 0);
}
  • Tools > Board > ESP32C3 Dev Module (USB CDC On Boot: Enabled), then Tools > Port and choose the board's port.

This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.

What you should see

The LED shows red, then green, then blue, and repeats.

If it does not work

The colours are swapped.
Makers order R, G and B differently. Swap the wires until red is red.

The same part on the ESP32-S3

Build something with it

These Build Packs use this part on this board, with the same pins.

More parts on the ESP32-C3