ArduCor  v3.0.0
Functions
Single Color Routines

Functions

void ArduCor::singleSolid (uint8_t red, uint8_t green, uint8_t blue)
 
void ArduCor::singleBlink (uint8_t red, uint8_t green, uint8_t blue)
 
void ArduCor::singleWave (uint8_t red, uint8_t green, uint8_t blue)
 
void ArduCor::singleGlimmer (uint8_t red, uint8_t green, uint8_t blue, uint8_t percent=20)
 
void ArduCor::singleFade (uint8_t red, uint8_t green, uint8_t blue, bool isSine)
 
void ArduCor::singleSawtoothFade (uint8_t red, uint8_t green, uint8_t blue, bool fadeIn)
 

Detailed Description

These routines each take a R, G, and B value as parameters to generate a color. This color is the only color used by the routine.

All routines except singleSolid should be called repeatedly on a loop for their full effect. The speed of the loop determines how fast the LEDs update.

Function Documentation

◆ singleBlink()

void ArduCor::singleBlink ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Switches between ON and OFF states using the provided color.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255

◆ singleFade()

void ArduCor::singleFade ( uint8_t  red,
uint8_t  green,
uint8_t  blue,
bool  isSine 
)

Fades the LEDs in and out based on the provided color. Can fade in two ways: linear and sine. If isSine is set to false, the interval between each update is constant. If isSine is true, a sine wave is used to generate the intervals, resulting in lights that stay on near their full brightness for longer.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255
isSineif true, a sine wave is used, if false, constant intervals are used.

◆ singleGlimmer()

void ArduCor::singleGlimmer ( uint8_t  red,
uint8_t  green,
uint8_t  blue,
uint8_t  percent = 20 
)

Set every LED to the provided color. A subset of the LEDs based on the percent parameter will be less bright than the rest of the LEDs.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255
percentdetermines how many LEDs will be slightly dimmer than the rest, between 0 and 100

◆ singleSawtoothFade()

void ArduCor::singleSawtoothFade ( uint8_t  red,
uint8_t  green,
uint8_t  blue,
bool  fadeIn 
)

If fadeIn is true, the LEDs start with a brightness value of 0 and each update rasies the brightness by a constant value. When it reaches maximum brightness, it resets the brightness back to 0 and repeats the fade in. If fadeIn is set to false, it does the opposite; it starts at full brightness and then fades to darkness.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255
fadeInif true, it fades from darkness to maximum brightness, if false, it fades from maximum brightness to darkness.

◆ singleSolid()

void ArduCor::singleSolid ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Set every LED to the provided color.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255

◆ singleWave()

void ArduCor::singleWave ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Uses the provided color and generates groups of the color in increasing levels of brightness. On each update, the LEDs move one index to the right. This creates a wave/scrolling effect.

Parameters
redstrength of red LED, between 0 and 255
greenstrength of green LED, between 0 and 255
bluestrength of blue LED, between 0 and 255

    ArduCor Copyright 2015 - 2018    
    All Rights MIT Licensed.    

    Generated by doxygen 1.8.11