Noiasca LED Control
An improved library to control MAX7219/MAX7221 Seven Segment LED displays
Public Member Functions | List of all members
LedControl Class Reference

class for MAX7219/MAX7221 (software bitbang) More...

#include <NoiascaLedControl.h>

Inheritance diagram for LedControl:
LedControl_base

Public Member Functions

 LedControl (uint8_t dataPin, uint8_t clkPin, uint8_t csPin, uint8_t numDevices=1)
 Create a new MAX7219/MAX7221 object for Hardware SPI. More...
 
void begin ()
 initialise hardware More...
 
- Public Member Functions inherited from LedControl_base
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...
 

Detailed Description

class for MAX7219/MAX7221 (software bitbang)

this class should be used if you can't use Hardware SPI.

Constructor & Destructor Documentation

◆ LedControl()

LedControl::LedControl ( uint8_t  dataPin,
uint8_t  clkPin,
uint8_t  csPin,
uint8_t  numDevices = 1 
)

Create a new MAX7219/MAX7221 object for Hardware SPI.

Parameters
dataPinpin on the Arduino where data gets shifted out
clkPinpin for the clock
csPinpin for selecting the device
numDevicesmaximum number of devices that can be controlled

Member Function Documentation

◆ begin()

void LedControl::begin ( )
virtual

initialise hardware

call this method in your setup(). initialise hardware - sets the pinMode for all needed GPIO

Reimplemented from LedControl_base.