40 else if (mode == DotBarMode::Bar)
41 this->displayRange(0, value);
43 this->displayDot(value - 1);
66 void dotMode() { setMode(DotBarMode::Dot); }
69 void barMode() { setMode(DotBarMode::Bar); }
72 void toggleMode() { getMode() == DotBarMode::Bar ? dotMode() : barMode(); }
#define BEGIN_AH_NAMESPACE
void display(float value) const
Display the given fraction of the LED bar.
void toggleMode()
Toggle the dot/bar mode.
void setMode(DotBarMode mode)
Set the mode to either dot or bar mode.
void display(uint16_t value) const
Display the given number of LEDs on the LED bar.
DotBarMode getMode() const
Get the dot/bar mode.
DotBarDisplayLEDs(const PinList< N > &ledPins)
Constructor from list of pins.
void dotMode()
Set the mode to dot mode.
void barMode()
Set the mode to bar mode.
A class for collections of LEDs that can display ranges.
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
DotBarMode
An enumeration type to set an LED display to either bar or dot mode.
@ Dot
Turn on only the active LED.
@ Bar
Turn on a range of LEDs up to the active LED.