Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
LedControl
LedControl fork
==========
LedControl is an [Arduino](http://arduino.cc) library for MAX7219 and MAX7221 Led display drivers.
The code also works with the [Teensy (3.1)](https://www.pjrc.com/teensy/)

Documentation
-------------
Documentation for the library is on the [Github Project Pages](http://wayoda.github.io/LedControl/)

Download
--------
The lastest binary version of the Library is always available from the
[LedControl Release Page](https://github.com/wayoda/LedControl/releases)


Install
-------
The library can be installed using the [standard Arduino library install procedure](http://arduino.cc/en/Guide/Libraries)







Original project https://github.com/wayoda/LedControl go there
15 changes: 14 additions & 1 deletion src/LedControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data)
shiftOut(SPI_MOSI,SPI_CLK,MSBFIRST,spidata[i-1]);
//latch the data onto the display
digitalWrite(SPI_CS,HIGH);
}
}

void LedControl::SetPixelOn(unsigned char dispnum, unsigned char r,unsigned char c,unsigned char intensity){
unsigned char row = 0;
this->setIntensity(dispnum,intensity);
while(row <r){
this->setRow(dispnum,row,0);
++row;
}
this->setRow(dispnum,r,1<<c); ++row;
while(row <8){
this->setRow(dispnum,row,0); ++row;
}
}


10 changes: 10 additions & 0 deletions src/LedControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ class LedControl {
* dp sets the decimal point.
*/
void setChar(int addr, int digit, char value, boolean dp);

/*
* Turn on a pixel in a defined position row,column
* Params:
* addr address of the display
* row row index 0...7
* col columns index 0...7
* intensity set the intensity 0...15
*/
void SetPixelOn(unsigned char dispnum, unsigned char r,unsigned char c,unsigned char intensity);
};

#endif //LedControl.h
Expand Down