After changing my code not to use the String class anymore but use char arrays, i ran into another problem
long TestA = 1;
word TestB = 1;
sprintf (tx, "%d %d %d %d", TestA, 2, 3, 4);
sprintf (tx, "%d %d %d %d", TestB, 2, 3, 4);
I would have expected the to outputs to be the same, but they are not.
It outputs the following two lines:
1 0 2 3
1 2 3 4
Can anybody explain this to me?
Isn't it possible to use a long or unsigned long with sprintf?