ArduinoDumbDisplay v0.9.9-r34
DumbDisplay Arduino Library -- https://github.com/trevorwslee/Arduino-DumbDisplay
 
Loading...
Searching...
No Matches
LedGridDDLayer Class Reference

Class for LED grid layer; created with DumbDisplay::createLedGridLayer() More...

#include <dumbdisplay.h>

Inheritance diagram for LedGridDDLayer:
DDLayer DDObject

Public Member Functions

 LedGridDDLayer (int8_t layerId)
 for internal use only
 
void turnOn (int x=0, int y=0)
 turn on LED @ (x, y)
 
void turnOff (int x=0, int y=0)
 turn off LED @ (x, y)
 
void toggle (int x=0, int y=0)
 toggle LED @ (x, y)
 
void turnOnEx (int x=0, int y=0, const String &onColor="")
 
void bitwise (unsigned int bits, int y=0, bool reverse=false)
 
void bitwise2 (unsigned int bits_0, unsigned int bits_1, int y=0, bool reverse=false)
 
void bitwise3 (unsigned int bits_0, unsigned int bits_1, unsigned int bits_2, int y=0, bool reverse=false)
 
void bitwise4 (unsigned int bits_0, unsigned int bits_1, unsigned int bits_2, unsigned int bits_3, int y=0, bool reverse=false)
 
void horizontalBar (int count, bool rightToLeft=false)
 
void verticalBar (int count, bool bottomToTop=true)
 
void horizontalBarEx (int count, int startX=0, const String &color="")
 
void verticalBarEx (int count, int startY=0, const String &color="")
 
void onColor (const String &color)
 
void offColor (const String &color)
 
void noOffColor ()
 set no LED off color
 
- Public Member Functions inherited from DDLayer
void border (float size, const String &color, const String &shape="flat", float extraSize=0)
 
void noBorder ()
 
void padding (float size)
 
void padding (float left, float top, float right, float bottom)
 
void noPadding ()
 
void margin (float size)
 
void margin (float left, float top, float right, float bottom)
 
void noMargin ()
 
void backgroundColor (const String &color, int opacity=100)
 
void noBackgroundColor ()
 
void visible (bool visible)
 
void transparent (bool transparent)
 
void disabled (bool disabled=true)
 
void opacity (int opacity)
 
void alpha (int alpha)
 
void blend (const String &color, int alpha=255, const String &mode="darken")
 
void noblend ()
 
void clear ()
 clear the layer
 
void flash ()
 normally used for "feedback" – flash the default way (layer + border)
 
void flashArea (int x, int y)
 normally used for "feedback" – flash the area (x, y) where the layer is clicked
 
void explicitFeedback (int16_t x=0, int16_t y=0, const String &text="", DDFeedbackType type=CLICK, const String &option="")
 
const String & getLayerId () const
 
void setFeedbackHandler (DDFeedbackHandler handler, const String &autoFeedbackMethod="", const String &allowFeedbackTypes="")
 
void enableFeedback (const String &autoFeedbackMethod="", const String &allowFeedbackTypes="")
 
void disableFeedback ()
 disable "feedback"
 
const DDFeedbackgetFeedback ()
 
void debugOnly (int i)
 for debug use
 
DDFeedbackManager * getFeedbackManager () const
 
DDFeedbackHandler getFeedbackHandler () const
 

Additional Inherited Members

- Public Attributes inherited from DDObject
int8_t objectType
 object type – DD_OBJECT_TYPE_LAYER or DD_OBJECT_TYPE_TUNNEL
 
String customData
 custom data
 
- Protected Member Functions inherited from DDLayer
 DDLayer (int8_t layerId)
 
void _enableFeedback ()
 
- Protected Attributes inherited from DDLayer
String layerId
 
DDFeedbackManager * pFeedbackManager
 
DDFeedbackHandler feedbackHandler
 

Detailed Description

Class for LED grid layer; created with DumbDisplay::createLedGridLayer()

Member Function Documentation

◆ bitwise()

void LedGridDDLayer::bitwise ( unsigned int  bits,
int  y = 0,
bool  reverse = false 
)

turn on/off LEDs based on bits

Parameters
bitsmost significant bit (bit 0) maps to left-most LED
yrow
reversetrue means reversed ... i.e. least significant bit (bit 31) maps to left-most LED

◆ bitwise2()

void LedGridDDLayer::bitwise2 ( unsigned int  bits_0,
unsigned int  bits_1,
int  y = 0,
bool  reverse = false 
)

turn on/off two rows of LEDs by bits

See also
bitwise()

◆ bitwise3()

void LedGridDDLayer::bitwise3 ( unsigned int  bits_0,
unsigned int  bits_1,
unsigned int  bits_2,
int  y = 0,
bool  reverse = false 
)

turn on/off three rows of LEDs by bits

See also
bitwise()

◆ bitwise4()

void LedGridDDLayer::bitwise4 ( unsigned int  bits_0,
unsigned int  bits_1,
unsigned int  bits_2,
unsigned int  bits_3,
int  y = 0,
bool  reverse = false 
)

turn on/off four rows of LEDs by bits

See also
bitwise()

◆ horizontalBar()

void LedGridDDLayer::horizontalBar ( int  count,
bool  rightToLeft = false 
)

turn on LEDs to form a horizontal "bar"

See also
bitwise()

◆ horizontalBarEx()

void LedGridDDLayer::horizontalBarEx ( int  count,
int  startX = 0,
const String &  color = "" 
)

turn on LEDs to form a horizontal "bar"

Parameters
countcan be negative (if it makes sense)
startXnormally 0
colorLED on color; DD_RGB_COLOR(...) or common color name; empty string means what already set

◆ offColor()

void LedGridDDLayer::offColor ( const String &  color)

set LED off color

Parameters
colorDD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name"

◆ onColor()

void LedGridDDLayer::onColor ( const String &  color)

set LED on color

Parameters
colorDD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name"

◆ turnOnEx()

void LedGridDDLayer::turnOnEx ( int  x = 0,
int  y = 0,
const String &  onColor = "" 
)

turn on LED @ (x, y)

Parameters
onColorLED on color (common color name); empty string means what already set

◆ verticalBar()

void LedGridDDLayer::verticalBar ( int  count,
bool  bottomToTop = true 
)

turn on LEDs to form a vertical "bar"

Parameters
bottomToToptrue means bottom to top

◆ verticalBarEx()

void LedGridDDLayer::verticalBarEx ( int  count,
int  startY = 0,
const String &  color = "" 
)

turn on LEDs to form a vertical "bar"

Parameters
countcan be negative (if it makes sense)
startYnormally 0
colorLED on color; DD_RGB_COLOR(...) or common color name; empty string means what already set