#include <MultiColorLight.h>
|
| MultiColorLight () |
|
void | begin (void) |
| initialize the multicolor component
|
|
void | setLed (uint8_t index, uint32_t color) |
| Set the specified led to the passed color.
|
|
void | setLed (leds leds, uint32_t color) |
| Set the specified leds to the passed color value.
|
|
void | setLed (leds leds, uint8_t red, uint8_t green, uint8_t blue) |
| Set the specified leds to the passed color value.
|
|
void | setTopLeds (uint32_t color) |
| sets the two leds on the top of the robot to the specified color
|
|
void | setTopLeds (uint8_t red, uint8_t green, uint8_t blue) |
| sets the two leds on the top of the robot to the specified color
|
|
void | blink (uint16_t amount, uint32_t color=0x00006400, leds leds=TOP, uint32_t interval=1000) |
| Let LEDs blink, returns after all blinks were executed.
|
|
void | turnOffLed (leds leds=ALL) |
| turn off the given leds
|
|
uint32_t | color (uint8_t r, uint8_t g, uint8_t b) |
| wrapper to calulate the used colorformat from a rgb-value
|
|
Definition at line 28 of file MultiColorLight.h.
◆ MultiColorLight()
MultiColorLight::MultiColorLight |
( |
| ) |
|
◆ begin()
void MultiColorLight::begin |
( |
void | | ) |
|
◆ blink()
void MultiColorLight::blink |
( |
uint16_t | amount, |
|
|
uint32_t | color = 0x00006400, |
|
|
leds | leds = TOP, |
|
|
uint32_t | interval = 1000 ) |
Let LEDs blink, returns after all blinks were executed.
- Parameters
-
amount | how often should the leds blink |
color | A 32-bit unsigned integer representing the color in the format 0x00RRGGBB, where RR is the red component, GG is the green component, and BB is the blue component. Each color can range between 0 to 100 Defaults to blue |
leds | which LEDs should blink, default is TOP |
interval | how many miliseconds the led is on, defaults to 1s |
Definition at line 57 of file MultiColorLight.cpp.
◆ color()
uint32_t MultiColorLight::color |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b ) |
wrapper to calulate the used colorformat from a rgb-value
- Parameters
-
r | red (0-100) |
g | green (0-100) |
b | blue (0-100) |
- Returns
- A 32-bit unsigned integer representing the color in the format 0x00RRGGBB, where RR is the red component, GG is the green component, and BB is the blue component.
Definition at line 88 of file MultiColorLight.cpp.
◆ setLed() [1/3]
void MultiColorLight::setLed |
( |
leds | leds, |
|
|
uint32_t | color ) |
Set the specified leds to the passed color value.
- Parameters
-
leds | which leds should be updated |
color | A 32-bit unsigned integer representing the color in the format 0x00RRGGBB, where RR is the red component, GG is the green component, and BB is the blue component. Each color can range between 0 to 100 |
Definition at line 21 of file MultiColorLight.cpp.
◆ setLed() [2/3]
void MultiColorLight::setLed |
( |
leds | leds, |
|
|
uint8_t | red, |
|
|
uint8_t | green, |
|
|
uint8_t | blue ) |
Set the specified leds to the passed color value.
- Parameters
-
leds | which leds should be updated |
red | brightness of red, is normalized in the function |
green | brightness of green, is normalized in the function |
blue | brightness of blue, is normalized in the function |
Definition at line 44 of file MultiColorLight.cpp.
◆ setLed() [3/3]
void MultiColorLight::setLed |
( |
uint8_t | index, |
|
|
uint32_t | color ) |
Set the specified led to the passed color.
- Parameters
-
index | ranging from 0-2, 0: Right, 1: Left, 2: Bottom |
color | A 32-bit unsigned integer representing the color in the format 0x00RRGGBB, where RR is the red component, GG is the green component, and BB is the blue component. Each color can range between 0 to 100 |
Definition at line 12 of file MultiColorLight.cpp.
◆ setTopLeds() [1/2]
void MultiColorLight::setTopLeds |
( |
uint32_t | color | ) |
|
sets the two leds on the top of the robot to the specified color
- Parameters
-
color | A 32-bit unsigned integer representing the color in the format 0x00RRGGBB, where RR is the red component, GG is the green component, and BB is the blue component. Each color can range between 0 to 100 |
Definition at line 49 of file MultiColorLight.cpp.
◆ setTopLeds() [2/2]
void MultiColorLight::setTopLeds |
( |
uint8_t | red, |
|
|
uint8_t | green, |
|
|
uint8_t | blue ) |
sets the two leds on the top of the robot to the specified color
- Parameters
-
red | brightness of red, is normalized in the function |
green | brightness of green, is normalized in the function |
blue | brightness of blue, is normalized in the function |
Definition at line 53 of file MultiColorLight.cpp.
◆ turnOffLed()
void MultiColorLight::turnOffLed |
( |
leds | leds = ALL | ) |
|
turn off the given leds
- Parameters
-
leds | which leds should be turned off, defaults to ALL |
Definition at line 66 of file MultiColorLight.cpp.
◆ ledAmount
const uint16_t MultiColorLight::ledAmount = 3 |
|
staticprotected |
◆ ledPin
const int16_t MultiColorLight::ledPin = 48 |
|
staticprotected |
◆ maxBrightness
const uint8_t MultiColorLight::maxBrightness = 150 |
|
staticprotected |
◆ rgbLeds
Adafruit_NeoPixel MultiColorLight::rgbLeds |
|
protected |
The documentation for this class was generated from the following files: