I have a sketch that scrolls text on an LED matrix. I have a scroll function that works fine if you set the string to scroll inside the function like so
void scroll()
{
char msg[] = "THE OBLIGATORY ARDUINO LED MATRIX PROJECT ";
But I wanted to pass the string into the function. So I changed it to this:
void Scroll(char *msg, int Speed)
{
it works, but it only scrolls the first letter. I have narrowed it down to this line:
for (int charIndex=0; charIndex < sizeof(msg)-1; charIndex++)
specifically the sizeof function. If I substitute it with a number, it scrolls that many letters. It seems that it always returns a 1 instead of the correct value.
Am I missing something?
Any help is appreciated
ematson5897