Of course this makes sense as a plotter works somehow similar although it often has bigger memory than an Arduino. But OK.
I should add a length to the array's. e.g the length of the array T is 5
int T[] = {[glow]5[/glow], 41,18,1,0, 9,21, 4,7, 14,7};
To spell words I would use normal strings and write a small interpreter. Something like below
void setup()
{
Serial.begin(19200);
}
void loop()
{
String s = "cat";
interpret(s);
while(1);
}
int A[] = {41,18,1,0, 9,21, 17,0, 4,7, 14,7};
int B[] = {23, 55, 44, 21, 77, 88, 41,18,1,0, 9,21, 17,0, 4,7, 14,7};
int C[] = {41,18,1,0, 9,21, 17,0, 4,7,33, 22, 14,7};
int T[] = {41,18,1,0, 9,21, 4,7, 14,7};
void interpret(String s)
{
for (byte i=0; i< s.length(); i++)
{
switch (s[i])
{
case 'a' : Draw(A); break;
case 'b' : Draw(B); break;
case 'c' : Draw(C); break;
case 't' : Draw(T); break;
default: break;
}
}
}
void Draw(int * p)
{
int len = p[0];
for (byte i=0; i< len; i++)
{
// draw the vectors.
}
}
As you have 26 letters you use quite some RAM for the vectors. This can be circumvented by dividing the letters in elementary vectors. That means the code above would change like this (pseudocode)
case 'a' : Draw(/); Draw(-); Draw(\); break;