UPDATED GitHub Added a Readme.md with some instructions :) https://github.com/AaronLiddiment/RGBLEDS/ UPDATED Videos:

UPDATED GitHub
Added a Readme.md with some instructions :slight_smile:

UPDATED Videos:

Is anyone interested in static/scrolling text functions?
I originally started messing with the excellent FastLED library on a 15x15 matrix, then liked the look of the funky plank so built a 7x68 panel and got an MSGEQ7, but always seem to have noise with a line in. So my direction shifted for a bit towards scrolling text messages.
I now have a LEDMatrix & TextScroller class libraries. It is very flexible and allows you to embed control codes in the uint8_t array to change colours, text direction, scrolling direction, frame rate & delays. It re-renders the frame on each call so is also suitable for frame based overlay of text on other patterns.
If there is interest I will make a video and try to neaten the code up a little before posting on here.

Please do ! Sounds great!

what Mark said!

what Randal said!

ok then :slight_smile:
Am new to YouTube & GitHub!
The video isn’t that great but will hopefully give you an idea of what can be done and the code is quite raw. The option ideas kept coming so the code got messy and possibly quite unreadable to some people :wink:

The LEDMatrix & TextScroller folders and just be copied into your Arduino Libraries folder.
Tip:- For the examples, don’t worry about the message size defines just make sure the Matrix defines match you matrix size and type.

holy smokes, thats fantastic!!! wow

Awesome, can’t wait to give this a go.

Nice! I have an old betabrite clone which I want to recycle into something far more controllable, I think your code will be of great help to me. Did you build the display yourself, or do you have details of where to get one?

This is great - thanks for sharing!! I have been wanting to do text scrolling for a while but hadn’t gotten time to write the code yet. This will save me a ton of time!

I’m going to try it first on my 24x24 array, and then I may build something similar to what you did. I just got 10 meters of 144 LED/meter strips that would work very well for this.

Ultimately I want to make a network-enabled reader board that I can interface to my home automation system and other things to alert me as needed.

I have a DigiX still laying around that I haven’t used yet and it might work great as a controller. For all my other projects I’ve used the Teensy 3.1 but I haven’t yet had the time to investigate external connectivity options for that controller.

Forgot to mention earlier that the TextScroller will render the text over multiple lines if it is initialised with a height greater than the font height. This was specifically added for the vertical scrolling options and made the function useful for displays other than single lines. If multiple lines of horizontally scrolling text are required then I would suggest 2 or more instances of cTextScroller with X/Y coordinates placing them above each other.
Of course you can also use the function to just render static text.
At the moment the fonts are limited to a width of 8 pixels but this could be fairly easily increased to 16 but this would obviously have an impact on the size of the font data array.
I have provided 2 fonts, one of which is described in binary data thus allowing easy modification of the the font in a text editor.
Also worth noting the mirror functions in the LEDMatrix class will work with all matrix sizes. If the dimension is odd, the center line is not mirrored.
John Oatham, yes I did make the panel myself using hardboard for LED mounting and stripwood around the edge to provide rigidity.

That is great. Very nicely done Aaron!

Thanks - time to dig out my 256 matrix and have a play.

Just updated the LEDMatrix class with some new triangular mirror functions. Spent ages writing code that directly calculated the array indexes thinking it would be more efficient only to find that X/Y versions that only took a short while to write were smaller and had similar execution times!
I have noticed a neat feature of the Arduino compiler in that if a class function is not used it is omitted from the code. This means I can add lots more Matrix functions with no code size penalty unless you use them.
Thanks for all your comments, I just hope you find the functions useful and easy to use. I need to work on some instructions, it’s just that takes longer than the coding :frowning:

I must say that as a n00b C programmer, I am lost in how to actually use the code… the examples work, but I can’t work out how to get what I want…

Like: Have a scrolling text field over the top of one of your cool mirror effects.

And have the text in the middle rows of my 16x16 matrix, rather than sitting on the bottom rows…

But, not a criticism - great functions! I guess I just need to hack and hack and hack some more until I geddit :slight_smile:

And…

In :
h = hue;
if (counter < 875)

Why 875?

Basically, I use 2 different backgrounds to show each of the mirror functions. I show each mirror function for 250 loops but also wanted to show the un-mirrored background for 125 loops.
So 875 comes from 125 (plain background) + 250 * 3 (first 3 mirror functions).
I had to change the background from diagonal stripes to vertical ones as the diagonal mirror functions were not effective :slight_smile:

When I first starting programming, it was on a VIC-20 with 3.5k ram, a reference guide and a machine language monitor cartridge. I taught myself 6502 assembler, but it took me god knows how many hours/days/months before it made sense :wink:

Here are some mods to the example to get a scrolling message working:-

AFTER
#include <LEDMatrix.h>
ADD
#include <TextScroller.h>
#include <FontRobotron.h>

AFTER
int16_t counter;
ADD
cTextScroller ScrollingMsg;
#define MESSAGE_WIDTH MATRIX_WIDTH
#define MESSAGE_HEIGHT (ROBOTRON_HEIGHT + 1)
#define MESSAGE_X 0
#define MESSAGE_Y ((MATRIX_HEIGHT - MESSAGE_HEIGHT) / 2)
const unsigned char TxtDemo[] = { EFFECT_RGB “\xff\xff\xff” " THIS IS SCROLLING OVER THE MATRIX MIRROR EXAMPLE" };

AFTER
hue = 0;
counter = 0;
ADD
ScrollingMsg.SetFont(ROBOTRON_WIDTH, ROBOTRON_HEIGHT, ROBOTRON_CHAR_LOW, ROBOTRON_CHAR_HIGH, RobotronData);
ScrollingMsg.Init(&LEDMatrix, MESSAGE_WIDTH, MESSAGE_HEIGHT, MESSAGE_X, MESSAGE_Y, BACKGND_LEAVE | CHAR_UP | SCROLL_LEFT);
ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);

AFTER
if (counter >= 2000)
counter = 0;
ADD
if (ScrollingMsg.UpdateText() == -1)
ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);

If you cut and paste the above sections into the Matrix Example the longer lines that have been wrapped in this post should still be correct.

Thanks @Aaron_Liddiment :slight_smile:

Hope my last comment didn’t come across as condescending, for me the try/fail/try/fail/try/fail/try/success was probably the only reason I remembered anything :slight_smile:
Of course thats no excuse for the lack of instructions…hopefully later this week!
One of the problems with these micro boards is real time debugging, while writing these classes I wrote a pseudo version of FastLED that renders LEDS on a window from within a Visual Studio project requiring only minimal changes to the Arduino source code. This also had the benefit that I could instantly change the size of my LED matrix for testing as I try to write all my code to work with any matrix size.

Hell no! I really appreciate you taking the time.

I’ve got 40+ years in IT, but never too old, or too proud, to ask for help.

It’s been more than 30 years since I was a programmer - I’ve got a lot of catching up to do :slight_smile:

I have just finished some instructions and placed them in the GitHub, I hope they make some sense!