Base class for MAX7219/MAX7221.
More...
#include <NoiascaLedControlCommon.h>
|
uint8_t | getDeviceCount () |
| get the number of devices attached of this object. More...
|
|
void | shutdown (uint8_t addr, bool status) |
| Set the shutdown (power saving) mode for the device. More...
|
|
void | setScanLimit (uint8_t addr, uint8_t limit) |
| Set the number of digits (or rows) to be displayed. More...
|
|
void | setIntensity (uint8_t addr, uint8_t intensity) |
| Set the brightness of the display. More...
|
|
void | clearDisplay (uint8_t addr) |
| Switch all LEDss on the display off. More...
|
|
void | setLed (uint8_t addr, uint8_t row, uint8_t col, boolean state) |
| Set the status of a single LEDs. More...
|
|
void | setRow (uint8_t addr, uint8_t row, uint8_t value) |
| Set all 8 LEDs in a row to a new state. More...
|
|
void | setColumn (uint8_t addr, uint8_t col, uint8_t value) |
| Set all 8 LEDs in a column to a new state. More...
|
|
void | setDigit (uint8_t addr, uint8_t digit, uint8_t value, boolean dp) |
| Display a hexadecimal digit on a 7-Segment Display. More...
|
|
void | setChar (uint8_t addr, uint8_t digit, char value, boolean dp) |
| Display a character on a 7-Segment display. More...
|
|
void | setEndOfDevice (optionEndOfDevice newOption) |
| Change the option of what should happen at the End of the Line (End of one Device/Adress) More...
|
|
void | setCursor (uint8_t newPosition) |
| Set the cursor to a specific position. More...
|
|
void | setCursor (uint8_t addr, uint8_t devPosition) |
| Set the Cursor to a specific position. More...
|
|
Base class for MAX7219/MAX7221.
This is an (abstract) class used as base for software bitbang and HW-SPI. It holds all common variables and member functions. If you create your instance (your object), don't use this base class but one of the two implementations
- See also
- LedControl
-
LedControlSpi
◆ getDeviceCount()
uint8_t LedControl_base::getDeviceCount |
( |
| ) |
|
get the number of devices attached of this object.
- Returns
- the number of devices (MAX7219/MAX7221) of this object
◆ shutdown()
void LedControl_base::shutdown |
( |
uint8_t |
addr, |
|
|
bool |
status |
|
) |
| |
Set the shutdown (power saving) mode for the device.
- Parameters
-
addr | The address of the display to control |
status | If true the device goes into power-down mode. Set to false for normal operation. |
◆ setScanLimit()
void LedControl_base::setScanLimit |
( |
uint8_t |
addr, |
|
|
uint8_t |
limit |
|
) |
| |
Set the number of digits (or rows) to be displayed.
See datasheet for sideeffects of the scanlimit on the brightness of the display.
- Parameters
-
addr | address of the display to control |
limit | number of digits to be displayed (1..8) |
◆ setIntensity()
void LedControl_base::setIntensity |
( |
uint8_t |
addr, |
|
|
uint8_t |
intensity |
|
) |
| |
Set the brightness of the display.
- Parameters
-
addr | the address of the display to control |
intensity | the brightness of the display. (0..15) |
◆ clearDisplay()
void LedControl_base::clearDisplay |
( |
uint8_t |
addr | ) |
|
Switch all LEDss on the display off.
- Parameters
-
addr | address of the display to control |
◆ setLed()
void LedControl_base::setLed |
( |
uint8_t |
addr, |
|
|
uint8_t |
row, |
|
|
uint8_t |
col, |
|
|
boolean |
state |
|
) |
| |
Set the status of a single LEDs.
- Parameters
-
addr | address of the display |
row | the row of the LEDs (0..7) |
col | the column of the LEDs (0..7) |
state | If true the led is switched on, if false it is switched off |
◆ setRow()
void LedControl_base::setRow |
( |
uint8_t |
addr, |
|
|
uint8_t |
row, |
|
|
uint8_t |
value |
|
) |
| |
Set all 8 LEDs in a row to a new state.
- Parameters
-
addr | address of the display |
row | row which is to be set (0..7) |
value | each bit set to 1 will light up the corresponding LED. |
◆ setColumn()
void LedControl_base::setColumn |
( |
uint8_t |
addr, |
|
|
uint8_t |
col, |
|
|
uint8_t |
value |
|
) |
| |
Set all 8 LEDs in a column to a new state.
- Parameters
-
addr | address of the display |
col | column which is to be set (0..7) |
value | each bit set to 1 will light up the corresponding LED |
◆ setDigit()
void LedControl_base::setDigit |
( |
uint8_t |
addr, |
|
|
uint8_t |
digit, |
|
|
uint8_t |
value, |
|
|
boolean |
dp |
|
) |
| |
Display a hexadecimal digit on a 7-Segment Display.
- Note
- use lc.print(value, HEX) instead.
- Parameters
-
addr | address of the display |
digit | the position of the digit on the display (0..7) |
value | the value to be displayed. (0x00..0x0F) |
dp | sets the decimal point. |
◆ setChar()
void LedControl_base::setChar |
( |
uint8_t |
addr, |
|
|
uint8_t |
digit, |
|
|
char |
value, |
|
|
boolean |
dp |
|
) |
| |
Display a character on a 7-Segment display.
There are only a few characters that make sense here : '0','1','2','3','4','5','6','7','8','9','0', 'A','b','c','d','E','F','H','L','P', '.','-','_',' '
- Note
- use print instead.
- Parameters
-
addr | address of the display |
digit | the position of the character on the display (0..7) |
value | the character to be displayed. |
dp | sets the decimal point. |
◆ setEndOfDevice()
Change the option of what should happen at the End of the Line (End of one Device/Adress)
- Parameters
-
newOption | one of following values |
- See also
- optionEndOfDevice
◆ setCursor() [1/2]
void LedControl_base::setCursor |
( |
uint8_t |
newPosition | ) |
|
Set the cursor to a specific position.
- Parameters
-
newPosition | new absolute position |
◆ setCursor() [2/2]
void LedControl_base::setCursor |
( |
uint8_t |
addr, |
|
|
uint8_t |
devPosition |
|
) |
| |
Set the Cursor to a specific position.
- Parameters
-
addr | adress of device |
devPosition | position in device. The order is 01234567 ! |