Skip to main content

Features

The Kode Dot integrates an addresable LED on the top left of the pad, that you can light up with the color and brightness you want. It is not a normal RGB LED, but an addresable RGB LED WS2812B. This means that inside the LED there is a small integrated circuit that can independently handle the color of the RGB LEDs and the brightness of each one.
FeatureDescription
DriverWS2812B - 1-Wire
Size2mm x 2mm
ColorRGB

Connection diagram

The addresable LED works through a single pin connected to the ESP32-S3.
WS2812BESP32-S3
DataGPIO4
1-Wire is a communication protocol that allows data communication through a single pin.

Arduino

ESP-IDF

Example code

This code lights up the addresable LED by making a color cycle: first red, then green, and finally blue.
rgb_cycle.ino
/**
 * Controls a single NeoPixel connected to GPIO 4, lighting it in red, green, and blue.
 * Each color stays on for half a second, turning off between changes.
 * Uses the Adafruit_NeoPixel library to control RGB LEDs.
 */
/* ───────── KODE | docs.kode.diy ───────── */

#include <Adafruit_NeoPixel.h> /* Library to control NeoPixel strips and LEDs */

#define NEOPIXEL_PIN   4                  /* GPIO pin where the NeoPixel is connected */
#define NUMPIXELS      1                  /* Number of connected NeoPixels */
#define PIXEL_FORMAT   (NEO_GRB + NEO_KHZ800) /* Color format and data speed */

Adafruit_NeoPixel *pixels;                /* Pointer to the NeoPixel object */

#define DELAYVAL       500                /* Delay time between changes (ms) */

void setup() {
  Serial.begin(115200);                   /* Start serial communication for debugging */

  /* Create the NeoPixel object with the defined parameters */
  pixels = new Adafruit_NeoPixel(NUMPIXELS, NEOPIXEL_PIN, PIXEL_FORMAT);

  pixels->begin();                        /* Initialize the NeoPixel */
  pixels->clear();                        /* Ensure the LED starts off */
  pixels->show();                         /* Apply the change */
}

void loop() {
  /* Turn on red */
  pixels->setPixelColor(0, pixels->Color(150, 0, 0));
  pixels->show();
  delay(DELAYVAL);

  /* Turn off */
  pixels->setPixelColor(0, pixels->Color(0, 0, 0));
  pixels->show();
  delay(DELAYVAL);

  /* Turn on green */
  pixels->setPixelColor(0, pixels->Color(0, 150, 0));
  pixels->show();
  delay(DELAYVAL);

  /* Turn off */
  pixels->setPixelColor(0, pixels->Color(0, 0, 0));
  pixels->show();
  delay(DELAYVAL);

  /* Turn on blue */
  pixels->setPixelColor(0, pixels->Color(0, 0, 150));
  pixels->show();
  delay(DELAYVAL);

  /* Turn off */
  pixels->setPixelColor(0, pixels->Color(0, 0, 0));
  pixels->show();
  delay(DELAYVAL);
}

Download examples

You can test the example codes using the Arduino IDE or the ESP-IDF IDE or download the codes in our drive: Addresable LED examples
I