Class that stores state and functions for interacting with LPD6803 RGB Pixels.
More...
#include <LPD6803.h>
Class that stores state and functions for interacting with LPD6803 RGB Pixels.
◆ LPD6803()
LPD6803::LPD6803 |
( |
uint16_t |
n, |
|
|
uint8_t |
dpin, |
|
|
uint8_t |
cpin |
|
) |
| |
LPD6803 constructor.
- Parameters
-
n | Number of pixels |
dpin | Data pin |
cpin | Clock pin |
◆ doSwapBuffersAsap()
void LPD6803::doSwapBuffersAsap |
( |
uint16_t |
idx | ) |
|
Update the pixels when next possible.
- Parameters
-
idx | Which LED we are updating |
◆ setPixelColor() [1/2]
void LPD6803::setPixelColor |
( |
uint16_t |
n, |
|
|
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
Set a pixel's color using separate red, green and blue components.
- Parameters
-
n | Pixel index, starting from 0 |
r | Red brightness, 0 = minimum (off), 255 = maximum |
g | Green brightness, 0 = minimum (off), 255 = maximum |
b | Blue brightness, 0 = minimum (off), 255 = maximum |
◆ setPixelColor() [2/2]
void LPD6803::setPixelColor |
( |
uint16_t |
n, |
|
|
uint16_t |
c |
|
) |
| |
Set a pixel's color using a 32-bit 'packed' RGB or RGBW value.
- Parameters
-
n | Pixel index, starting from 0. |
c | 32-bit color value. Most significant byte is white (for RGBW pixels) or ignored (for RGB pixels), next is red, then green, and least significant byte is blue |
◆ setCPUmax()
void LPD6803::setCPUmax |
( |
uint8_t |
m | ) |
|
Sets max cpu speed.
- Parameters
-
m | max CPU clock speed, in MHz |
◆ numPixels()
uint16_t LPD6803::numPixels |
( |
void |
| ) |
|
Number of pixels connected.
- Returns
- Returns a 16-bit signed int equal to how many pixels are connected
The documentation for this class was generated from the following files: