Adafruit Library
Functions | Variables
Wippersnapper_StatusLED.cpp File Reference
#include "Wippersnapper_StatusLED.h"
#include "Wippersnapper.h"

Functions

void initStatusLED ()
 Initializes board-specific status LED pixel.
 
void releaseStatusLED ()
 De-initializes the status LED and releases pin.
 
void setStatusLEDBrightness (float brightness)
 Sets the status pixel's brightness. More...
 
void setStatusLEDColor (uint32_t color)
 Sets a status RGB LED's color. More...
 
void setStatusLEDColor (uint32_t color, int brightness)
 Sets a status RGB LED's color. More...
 
int16_t getStatusNeoPixelPin ()
 Retrieve the pin number used for NeoPixel data output. More...
 
int16_t getStatusDotStarDataPin ()
 Retrieve the pin number used for DotStar data output. More...
 
void statusLEDFade (uint32_t color, int numFades=3)
 Fades the status LED. More...
 
uint32_t ledStatusStateToColor (ws_led_status_t statusState)
 Converts the a ws_led_status_t status state to color. More...
 
void statusLEDSolid (ws_led_status_t statusState=WS_LED_STATUS_ERROR_RUNTIME)
 Sets the status LED to a specific color depending on the hardware's state. More...
 
void statusLEDBlink (ws_led_status_t statusState)
 Blinks a status LED a specific color depending on the hardware's state. More...
 

Variables

Wippersnapper WS
 

Detailed Description

Interfaces for the Wippersnapper status indicator LED/NeoPixel/Dotstar/RGB LED.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Copyright (c) Brent Rubell 2020-2022 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

Function Documentation

◆ setStatusLEDBrightness()

void setStatusLEDBrightness ( float  brightness)

Sets the status pixel's brightness.

Parameters
brightnessDesired pixel brightness, from 0.0 (0%) to 1.0 (100%).

◆ setStatusLEDColor() [1/2]

void setStatusLEDColor ( uint32_t  color)

Sets a status RGB LED's color.

Parameters
colorDesired RGB color.

◆ setStatusLEDColor() [2/2]

void setStatusLEDColor ( uint32_t  color,
int  brightness 
)

Sets a status RGB LED's color.

Parameters
colorDesired RGB color.
brightnessBrightness level, as an integer

◆ getStatusNeoPixelPin()

int16_t getStatusNeoPixelPin ( )

Retrieve the pin number used for NeoPixel data output.

Returns
Arduino pin number (-2 if not set).

◆ getStatusDotStarDataPin()

int16_t getStatusDotStarDataPin ( )

Retrieve the pin number used for DotStar data output.

Returns
Arduino pin number (-2 if not set).

◆ statusLEDFade()

void statusLEDFade ( uint32_t  color,
int  numFades = 3 
)

Fades the status LED.

Parameters
colorThe specific color to fade the status LED.
numFadesThe amount of time to fade/pulse the status LED.

◆ ledStatusStateToColor()

uint32_t ledStatusStateToColor ( ws_led_status_t  statusState)

Converts the a ws_led_status_t status state to color.

Parameters
statusStateHardware's status state.
Returns
Color as a uint32_t

◆ statusLEDSolid()

void statusLEDSolid ( ws_led_status_t  statusState = WS_LED_STATUS_ERROR_RUNTIME)

Sets the status LED to a specific color depending on the hardware's state.

Parameters
statusStateHardware's status state.

◆ statusLEDBlink()

void statusLEDBlink ( ws_led_status_t  statusState)

Blinks a status LED a specific color depending on the hardware's state.

Parameters
statusStateHardware's status state.

Variable Documentation

◆ WS

Wippersnapper variable.