I'm trying to make a led sign with a WS2812b ledstrip, using the FastLed library (by the way, this is a great library!), I'm already able to show a text (so far only one, which I leave saved in an array of characters at the beginning of the program), but I would like to be able to change this text using the serial port of the Arduino, and here is the problem:
When setting the text to be displayed in the array of LEDs, the function that I should use is:
ScrollingMsg.SetText ((unsigned char *) TxtDemo, sizeof (TxtDemo) - 1);}
Where TxtDemo is a variable type char array.
Until here all is right, as I commented I can show the text, but at the time of receiving the data from the serial port and save them in the char array TxtDemo, when I use the function
sizeof(TxtDemo), the value I get remains with the original size (quite understandable) of this array.
For example: If the initial text was (saved in TxtDemo):
"Hello world", the
sizeof() function, returns "11",
But when I pick up what I want to show on the serial port and store it in the variable TxtDemo, there's no way I can alter the size of that array. So ... what can I do? What do you recommend me to do?