Adafruit IS31FL3741 Library
Public Member Functions | Protected Attributes | List of all members
Adafruit_IS31FL3741_GlassesRing_buffered Class Reference

Class for Adafruit LED Glasses (ring portion) with LED data being buffered on the microcontroller and sent only when show() is called. Not used by user code directly, the left and right classes below create distinct subclasses for that. More...

#include <Adafruit_IS31FL3741.h>

Inheritance diagram for Adafruit_IS31FL3741_GlassesRing_buffered:
Adafruit_IS31FL3741_GlassesLeftRing_buffered Adafruit_IS31FL3741_GlassesRightRing_buffered

Public Member Functions

 Adafruit_IS31FL3741_GlassesRing_buffered (Adafruit_IS31FL3741_buffered *controller, bool isRight)
 Constructor for buffered glasses LED ring. Not invoked by user code; use one of the subsequent subclasses for that. More...
 
void setPixelColor (int16_t n, uint32_t color)
 Set color of one pixel of one buffered glasses ring. No immediate effect on LEDs; must follow up with show(). More...
 
void fill (uint32_t color)
 Fill all pixels of one glasses ring to same color. No immediate effect on LEDs; must follow up with show(). More...
 
uint8_t numPixels (void) const
 Return number of LEDs in ring (a la NeoPixel) More...
 
void setBrightness (uint8_t b)
 Set brightness of LED ring. This is a mathematical brightness scale applied to setPixel() colors when setting ring pixels, distinct from any value passed to setLEDscaling() functions, because matrix and rings share pixels. More...
 

Protected Attributes

Adafruit_IS31FL3741_buffered_is31 = NULL
 Pointer to core object.
 
uint16_t _brightness = 256
 Internally 1-256 for math.
 
const uint16_t * ring_map
 Pointer to lookup table.
 

Detailed Description

Class for Adafruit LED Glasses (ring portion) with LED data being buffered on the microcontroller and sent only when show() is called. Not used by user code directly, the left and right classes below create distinct subclasses for that.

Note
This class is deprecated but provided for compatibility. New code should use the Adafruit_EyeLights classes.

Constructor & Destructor Documentation

◆ Adafruit_IS31FL3741_GlassesRing_buffered()

Adafruit_IS31FL3741_GlassesRing_buffered::Adafruit_IS31FL3741_GlassesRing_buffered ( Adafruit_IS31FL3741_buffered controller,
bool  isRight 
)

Constructor for buffered glasses LED ring. Not invoked by user code; use one of the subsequent subclasses for that.

Parameters
controllerPointer to Adafruit_IS31FL3741 object.
isRighttrue if right ring, false if left.

Member Function Documentation

◆ setPixelColor()

void Adafruit_IS31FL3741_GlassesRing_buffered::setPixelColor ( int16_t  n,
uint32_t  color 
)

Set color of one pixel of one buffered glasses ring. No immediate effect on LEDs; must follow up with show().

Parameters
nIndex of pixel to set (0-23).
colorRGB888 (24-bit) color, a la NeoPixel.

◆ fill()

void Adafruit_IS31FL3741_GlassesRing_buffered::fill ( uint32_t  color)

Fill all pixels of one glasses ring to same color. No immediate effect on LEDs; must follow up with show().

Parameters
colorRGB888 (24-bit) color, a la NeoPixel.

◆ numPixels()

uint8_t Adafruit_IS31FL3741_GlassesRing_buffered::numPixels ( void  ) const
inline

Return number of LEDs in ring (a la NeoPixel)

Returns
int Always 24.

◆ setBrightness()

void Adafruit_IS31FL3741_GlassesRing_buffered::setBrightness ( uint8_t  b)
inline

Set brightness of LED ring. This is a mathematical brightness scale applied to setPixel() colors when setting ring pixels, distinct from any value passed to setLEDscaling() functions, because matrix and rings share pixels.

Parameters
bBrightness from 0 (off) to 255 (max).

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