The Loop in the example reads like:
// send a message!
for (uint8_t i=0; i<strlen(message)-4; i++) {
alpha4.writeDigitAscii(0, message[i]);
alpha4.writeDigitAscii(1, message[i+1]);
alpha4.writeDigitAscii(2, message[i+2]);
alpha4.writeDigitAscii(3, message[i+3]);
alpha4.writeDisplay();
If you try this with a string length 4 you will discover a wrong display.
This works:
char *message = "4711";
// send a message!
for (uint8_t i=0; i<strlen(message)-3; i++) {
alpha4.writeDigitAscii(0, message[i]);
alpha4.writeDigitAscii(1, message[i+1]);
alpha4.writeDigitAscii(2, message[i+2]);
alpha4.writeDigitAscii(3, message[i+3]);
alpha4.writeDisplay();
A general comment:
The examples are far too complicated. I would suggest to give a simple example just showing a four letter string without rolling, scrolling and the like. These complicated operations are nice to have, but pls start with the basics.
It would be helpful, you could give an example how to display integers on the display.
The Loop in the example reads like:
// send a message!
for (uint8_t i=0; i<strlen(message)-4; i++) {
alpha4.writeDigitAscii(0, message[i]);
alpha4.writeDigitAscii(1, message[i+1]);
alpha4.writeDigitAscii(2, message[i+2]);
alpha4.writeDigitAscii(3, message[i+3]);
alpha4.writeDisplay();
If you try this with a string length 4 you will discover a wrong display.
This works:
char *message = "4711";
// send a message!
for (uint8_t i=0; i<strlen(message)-3; i++) {
alpha4.writeDigitAscii(0, message[i]);
alpha4.writeDigitAscii(1, message[i+1]);
alpha4.writeDigitAscii(2, message[i+2]);
alpha4.writeDigitAscii(3, message[i+3]);
alpha4.writeDisplay();
A general comment:
The examples are far too complicated. I would suggest to give a simple example just showing a four letter string without rolling, scrolling and the like. These complicated operations are nice to have, but pls start with the basics.
It would be helpful, you could give an example how to display integers on the display.