AaronLiddiment / RGBLEDS

Matrix, Text & Sprite libraries for use with FastLED
68 stars 28 forks source link

Subdivide LedMatrix to display different texts #16

Open Surbyte opened 3 years ago

Surbyte commented 3 years ago

It's not really a problem, your library is great. Is it possible to subdivide a Led Matrix objetc initilization to show different texts? Imagine 4 divitions for instance: time in a corner upper right with a small font. temperatura on bottom right with larger font. Text1 on Upper left with a large font. counter on the bottom left with small font.

AaronLiddiment commented 3 years ago

Firstly, please change over and use the individual libraries rather than this combined one which is older.

To answer your question then yes it should be quite easy. Just use one cLEDMatrix and multiple cLEDText classes. Each of the text classes should be passed the same Matrix definition. Then when you initialise each Text class you just assign its area on the Matrix and can use different fonts with each one. Then you would just call UpdateText member function for each the Text Classes before calling a Fastled show.

Surbyte commented 3 years ago

Thank you very much, i will try to do it.

Surbyte commented 3 years ago

You are right, too easy, it works!! Two objects cLed with diferents X,Y coordinates. Thank you very much.