Neopixel Display base.
More...
#include <Noiasca_NeopixelDisplay.h>
Inherits Print.
|
| Noiasca_NeopixelDisplay (Adafruit_NeoPixel &strip, const segsize_t segment[8], byte numDigits, byte pixelPerDigit) |
| Constructor with 4 parameters. More...
|
|
| Noiasca_NeopixelDisplay (Adafruit_NeoPixel &strip, const segsize_t segment[8], byte numDigits, byte pixelPerDigit, uint16_t startPixel) |
| Constructor with 5 parameters. More...
|
|
| Noiasca_NeopixelDisplay (Adafruit_NeoPixel &strip, const segsize_t segment[8], byte numDigits, byte pixelPerDigit, uint16_t startPixel, byte addPixels, CallBack funcPtr) |
| Constructor with 7 parameters. More...
|
|
void | clear () |
| clear all pixels of the NeoPixel display. More...
|
|
void | setColorBack (uint32_t newColor) |
| set the background color More...
|
|
void | setColorFont (uint32_t newColor) |
| set the font color More...
|
|
void | setCursor (uint8_t newPosition) |
| set cursor to the specifed cursor More...
|
|
void | setPixelColor (uint16_t pixel, uint32_t color) |
| set a pixel to a specific color More...
|
|
void | setRightToLeft () |
| reverses the numbering of digits More...
|
|
void | show () |
| show the current buffer on the display More...
|
|
void | writeLowLevel (uint8_t position, segsize_t bitmask, bool addOnly=false) |
| write a bitmap to the display More...
|
|
Neopixel Display base.
The Noiasca Neopixel Display class can be used for 7 segment displays made of neopixel / WS2812 LEDs.
◆ Noiasca_NeopixelDisplay() [1/3]
Noiasca_NeopixelDisplay::Noiasca_NeopixelDisplay |
( |
Adafruit_NeoPixel & |
strip, |
|
|
const segsize_t |
segment[8], |
|
|
byte |
numDigits, |
|
|
byte |
pixelPerDigit |
|
) |
| |
|
inline |
Constructor with 4 parameters.
The Noiasca Neopixel Display class can be used for 7 segment displays made of neopixel / WS2812 LEDs.
- Parameters
-
strip | a reference to your strip. |
segment | an array with the needed pixels for each segment. |
numDigits | how many digits you have on your display. |
pixelPerDigit | number of used pixels per digit. |
◆ Noiasca_NeopixelDisplay() [2/3]
Noiasca_NeopixelDisplay::Noiasca_NeopixelDisplay |
( |
Adafruit_NeoPixel & |
strip, |
|
|
const segsize_t |
segment[8], |
|
|
byte |
numDigits, |
|
|
byte |
pixelPerDigit, |
|
|
uint16_t |
startPixel |
|
) |
| |
|
inline |
Constructor with 5 parameters.
- Parameters
-
strip | a reference to your strip. |
segment | an array with the needed pixels for each segment. |
numDigits | how many digits you have on your display. |
pixelPerDigit | number of used pixels per digit. |
startPixel | if don't start with pixel 0 on the display use the 5th parameter to define the first pixel on the display. |
◆ Noiasca_NeopixelDisplay() [3/3]
Noiasca_NeopixelDisplay::Noiasca_NeopixelDisplay |
( |
Adafruit_NeoPixel & |
strip, |
|
|
const segsize_t |
segment[8], |
|
|
byte |
numDigits, |
|
|
byte |
pixelPerDigit, |
|
|
uint16_t |
startPixel, |
|
|
byte |
addPixels, |
|
|
CallBack |
funcPtr |
|
) |
| |
|
inline |
Constructor with 7 parameters.
- Parameters
-
strip | a reference to your strip. |
segment | an array with the needed pixels for each segment. |
numDigits | how many digits you have on your display. |
pixelPerDigit | number of used pixels per digit. |
startPixel | if don't start with pixel 0 on the display use the 5th parameter to define the first pixel on the display. |
addPixels | if there are more pixels in the chain than used for numbers on the display use this parameter to inform the library about the additional pixels. |
funcPtr | a callback function to calculate the start pixel for each digit. |
◆ clear()
void Noiasca_NeopixelDisplay::clear |
( |
| ) |
|
|
inline |
clear all pixels of the NeoPixel display.
This method uses Adafruits fill method to clear the definied
pixels of the display.
- Note
- Clearing is done by overwriting all pixels (startPixel to length) with the current background color.
◆ setColorBack()
void Noiasca_NeopixelDisplay::setColorBack |
( |
uint32_t |
newColor | ) |
|
|
inline |
set the background color
The background color is used if a pixel is "off" according to the character bitmap.
- Parameters
-
newColor | the new color to be used for the next write |
◆ setColorFont()
void Noiasca_NeopixelDisplay::setColorFont |
( |
uint32_t |
newColor | ) |
|
|
inline |
set the font color
The font color is used if a pixel is definied in the bitmap.
- Parameters
-
newColor | the new color to be used for the next write.
|
◆ setCursor()
void Noiasca_NeopixelDisplay::setCursor |
( |
uint8_t |
newPosition | ) |
|
|
inline |
set cursor to the specifed cursor
The order of cursor positions is from LEFT to RIGHT, starting with 0 on the LEFT.
- Parameters
-
newPosition | the new cursor position for the display
|
◆ setPixelColor()
void Noiasca_NeopixelDisplay::setPixelColor |
( |
uint16_t |
pixel, |
|
|
uint32_t |
color |
|
) |
| |
|
inline |
set a pixel to a specific color
This gives you direct access to the strip object. It is a imple passthrough method to the Neopixel strip
- Parameters
-
pixel | the pixel you want to change |
color | the new color for this pixel |
◆ setRightToLeft()
void Noiasca_NeopixelDisplay::setRightToLeft |
( |
| ) |
|
|
inline |
reverses the numbering of digits
If the pixels are wired from RIGHT to LEFT use this command to reverse the display
◆ show()
void Noiasca_NeopixelDisplay::show |
( |
| ) |
|
|
inline |
show the current buffer on the display
It is a simple passthrough method to the Neopixel strip.
◆ writeLowLevel()
void Noiasca_NeopixelDisplay::writeLowLevel |
( |
uint8_t |
position, |
|
|
segsize_t |
bitmask, |
|
|
bool |
addOnly = false |
|
) |
| |
|
inline |
write a bitmap to the display
This low level write will write a bitmap to the given position of your display.
- Parameters
-
position | the position where the bitmap should be printed |
bitmask | the bitmask to be printed |
addOnly | if set to true, the bitmap will be added to the position. By default (false) only the new bitmap will be shown. |