From dabbeb49b10fd8748a5a4b6e02a127d8d1594c26 Mon Sep 17 00:00:00 2001 From: raffra <35594199+raffra@users.noreply.github.com> Date: Thu, 10 Jan 2019 10:43:41 +0100 Subject: [PATCH 1/3] Update LedControl.cpp --- src/LedControl.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/LedControl.cpp b/src/LedControl.cpp index e43211fd..775fd454 100644 --- a/src/LedControl.cpp +++ b/src/LedControl.cpp @@ -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 setRow(dispnum,row,0); + ++row; + } + this->setRow(dispnum,r,1<setRow(dispnum,row,0); ++row; + } +} From 0442f5d815d8df7b279e7893d4ce2f5b488443e0 Mon Sep 17 00:00:00 2001 From: raffra <35594199+raffra@users.noreply.github.com> Date: Thu, 10 Jan 2019 10:44:32 +0100 Subject: [PATCH 2/3] Update LedControl.h --- src/LedControl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/LedControl.h b/src/LedControl.h index cdfaa1f5..f31f1867 100644 --- a/src/LedControl.h +++ b/src/LedControl.h @@ -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 From 83c6bc80b7b86069f16eed5cd0f03181e724f29a Mon Sep 17 00:00:00 2001 From: raffra <35594199+raffra@users.noreply.github.com> Date: Thu, 10 Jan 2019 11:52:59 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7e2b71e4..04a018c6 100644 --- a/README.md +++ b/README.md @@ -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