![]() |
MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
|
Class for controlling an RGB LED. More...
#include <MiniR4LED.h>
Public Member Functions | |
MiniR4LED () | |
void | begin (uint8_t pin) |
Initializes the LED. (Built-in at Uno Pin 7) | |
bool | setColor (uint8_t idx, uint32_t rgb) |
Sets the color of the LED. | |
bool | setColor (uint8_t idx, uint8_t r, uint8_t g, uint8_t b) |
Sets the color of the LED using separate RGB values. | |
void | setBrightness (uint8_t idx, uint8_t brightness) |
Sets the brightness of the LED. | |
Class for controlling an RGB LED.
This class provides functionality to set colors and brightness for an RGB LED connected to a specified pin. It uses the WS2812B protocol for communication.
Definition at line 16 of file MiniR4LED.h.
|
inline |
Definition at line 19 of file MiniR4LED.h.
|
inline |
Initializes the LED. (Built-in at Uno Pin 7)
pin | The pin number to which the LED is connected. |
Definition at line 26 of file MiniR4LED.h.
|
inline |
Sets the brightness of the LED.
idx | The index of the LED (1 or 2). |
brightness | The brightness level (0-255). (Default is 255) |
Definition at line 87 of file MiniR4LED.h.
|
inline |
Sets the color of the LED.
idx | The index of the LED (1 or 2). |
rgb | The color in RGB format. |
Definition at line 56 of file MiniR4LED.h.
|
inline |
Sets the color of the LED using separate RGB values.
idx | The index of the LED (1 or 2). |
r | Red value (0-255). |
g | Green value (0-255). |
b | Blue value (0-255). |
Definition at line 75 of file MiniR4LED.h.