Skip to main content

Inkplate 6MOTION - RGB LEDs

The Inkplate 6MOTION includes two WS2812 RGB LEDs, allowing full-color control for notifications, status indicators, or creative lighting effects.

ℹ️
The WS2812 implementation in the Inkplate Motion library uses this library from Adafruit:

Adafruit NeoPixel Library

The original library which is included in the Inkplate 6MOTION library


Configuration

Before using the LEDs, they must be powered on and initialized.

ℹ️
The RGB LEDs must be powered on via peripheralState. See this page for more details:

Peripheral basics

How to power peripherals on and off on Inkplate 6MOTION

begin() initializes the NeoPixel library. You can use setBrightness as a general setting for the brightness of both of the LEDs:

// Power on LEDs
inkplate.peripheralState(INKPLATE_PERIPHERAL_WS_LED, true);

// Initialize LEDs
inkplate.led.begin();

// Set brightness (0-255)
inkplate.led.setBrightness(125);

inkplate.led.begin()

Configures the NeoPixel LED pin for output. This function must be called before setting LED colors.

Returns value: none

inkplate.led.setBrightness()

Adjusts the LED brightness level. The brightness change takes effect on the next `show()` call.

Returns value: none

Function parameters:

TypeNameDescription
uint8_tbBrightness level (0 = off, 255 = brightest).

Changing colors

To set a specific color on an LED, use setPixelColor(), then call show() to apply changes.

// Set first LED to red
inkplate.led.setPixelColor(0, 150, 0, 0);
// Set second LED to green
inkplate.led.setPixelColor(1, 0, 150, 0);

// Apply changes
inkplate.led.show();

inkplate.led.setPixelColor()

Sets an individual LED's color using separate red, green, and blue components.

Returns value: none

Function parameters:

TypeNameDescription
uint16_tnIndex of the LED (starting from 0).
uint8_trRed brightness (0-255).
uint8_tgGreen brightness (0-255).
uint8_tbBlue brightness (0-255).

inkplate.led.show()

Sends the color data from RAM to the NeoPixels, applying the changes set by `setPixelColor()`.

Returns value: none


Full example

For an in-depth example, check out the Inkplate Motion library:

Inkplate_6_MOTION_WSLED.ino

Full WS2812 LED example in the Inkplate Motion library