bartoszbielawski / LEDMatrixDriver

A replacement for Arduino's LedControl library
MIT License
74 stars 25 forks source link

Add single matrix control and custom horizonial line #8

Closed xJoeWoo closed 6 years ago

xJoeWoo commented 6 years ago

Added some "shortcuts" for controlling single matrix. Added "repeat row" method so that we can create a separate row easily. (Maybe "repeat column" is useful as well?) Added "full" method to set all led to on status.

An example is provided for testing.

bartoszbielawski commented 6 years ago

Hi, When I was writing my code I was hoping to get rid of the "segmented" display.

Most of the functions you have have implemented can be implemented using the calls that are already there (saving on debugging time). Can you give me at least two sensible use cases for your additions?

Cheers, Bartosz

xJoeWoo commented 6 years ago

Hi! Thanks for your reply.

These days I was working on my 5x2 matrix display and I found this great library. Because there were two rows of matrix and I need to display things cross rows, in my opinion, separate them into single matrix or single row would be easier to control now.

Though the "setPixel" function is powerful enough, x,y coordinate is quite easy and useful in one row situation, however, in multiple rows project, we'll need write some code to transform the x,y coordinate to where they should be. These codes are repeated for every project that use more than one row to display, so I want to share them.

Or, if we want to get rid of segmented display, we can provide a new "setPixel" function that the x,y is correct for multiple rows situation. I would love to provide more support. :)

Yours, Joe

bartoszbielawski commented 6 years ago

Hi,

Sorry for the late response, I have left for holidays. To be honest, there are a lot of changes in your commit. I'd prefer to keep the library simple. I'd suggest creating w wrapper that would just collect multiple displays with single row. This way you get what you need and the library stays the same.

Cheers, Bartosz