Firmware for an ad-hoc mesh network of Internet-of-Things devices based on LoRa (Long Range radio) that can be deployed quickly and cheaply.
DuckLed Class Reference

Internal on board LED abstraction. More...

#include <DuckLed.h>

Public Member Functions

void setColor (int ledR=CDPCFG_PIN_RGBLED_R, int ledG=CDPCFG_PIN_RGBLED_G, int ledB=CDPCFG_PIN_RGBLED_B)
 Set the Color object. More...
 
void setupLED (int redPin=CDPCFG_PIN_RGBLED_R, int greenPin=CDPCFG_PIN_RGBLED_G, int bluePin=CDPCFG_PIN_RGBLED_B)
 Initialize access to the LED. More...
 

Static Public Member Functions

static DuckLedgetInstance ()
 Get a singletom instance of the DuckLed class. More...
 

Detailed Description

Internal on board LED abstraction.

Provides internal access to the onboard LED, so CDP can show useful status information about the network and the device.

Member Function Documentation

◆ getInstance()

static DuckLed* DuckLed::getInstance ( )
static

Get a singletom instance of the DuckLed class.

Returns
A pointer to DuckLed object.

◆ setColor()

void DuckLed::setColor ( int  ledR = CDPCFG_PIN_RGBLED_R,
int  ledG = CDPCFG_PIN_RGBLED_G,
int  ledB = CDPCFG_PIN_RGBLED_B 
)

Set the Color object.

Parameters
ledRvalue of the Red component. Defaults to CDPCFG_PIN_RGBLED_R
ledGvalue of the Green component. Defaults to CDPCFG_PIN_RGBLED_G
ledBvalue of the Blue component. Defaults to CDPCFG_PIN_RGBLED_B

◆ setupLED()

void DuckLed::setupLED ( int  redPin = CDPCFG_PIN_RGBLED_R,
int  greenPin = CDPCFG_PIN_RGBLED_G,
int  bluePin = CDPCFG_PIN_RGBLED_B 
)

Initialize access to the LED.

Parameters
redPinvalue of the Red pin. Defaults to CDPCFG_PIN_RGBLED_R
greenPinvalue of the Green pin. Defaults to CDPCFG_PIN_RGBLED_G
bluePinvalue of the Blue pin. Defaults to CDPCFG_PIN_RGBLED_B

The documentation for this class was generated from the following file: