0: ________ ________ __*_____ ________ ________
1: ________ ________ ___*____ ________ ________
2: ________ ________ ____*___ ________ ________
3: ________ ________ _____*__ ________ ________
4: ________ ________ ______*_ ________ ________
5: ________ ________ _______* ________ ________
6: ________ ________ ________ ________ *_______
7: ________ ________ ________ ________ _*______
8: ________ ________ ________ ________ __*_____
9: ________ ________ ________ ________ ___*____
10: ________ ________ ________ ________ ____*___
11: ________ ________ ________ ________ _____*__
12: ________ __*_____ ________ ________ ________
13: ________ ___*____ ________ ________ ________
14: ________ ________ ________ ________ ______*_
15: ________ ________ ________ ________ _______*
16: ________ ________ ________ *_______ ________
17: ________ ________ ________ _*______ ________
18: ________ ____*___ ________ ________ ________
19: ________ _____*__ ________ ________ ________
20: ________ ______*_ ________ ________ ________
21: ________ _______* ________ ________ ________
22: ________ ________ ________ __*_____ ________
23: ________ ________ ________ ___*____ ________
24: ________ ________ ________ ____*___ ________
25: ________ ________ ________ _____*__ ________
26: *_______ ________ ________ ________ ________
27: _*______ ________ ________ ________ ________
28: __*_____ ________ ________ ________ ________
29: ___*____ ________ ________ ________ ________
30: ________ ________ ________ ______*_ ________
31: ________ ________ ________ _______* ________
32: ________ ________ *_______ ________ ________
33: ________ ________ _*______ ________ ________
34: ____*___ ________ ________ ________ ________
35: _____*__ ________ ________ ________ ________
const int L = 5;
byte leds [][L] = {
{0, 0, 4, 0, 0},
{0, 0, 8, 0, 0},
{0, 0, 16, 0, 0},
{0, 0, 32, 0, 0},
{0, 0, 64, 0, 0},
{0, 0, 128, 0, 0},
{0, 0, 0, 0, 1},
{0, 0, 0, 0, 2},
{0, 0, 0, 0, 4},
{0, 0, 0, 0, 8},
{0, 0, 0, 0, 16},
{0, 0, 0, 0, 32},
{0, 4, 0, 0, 0},
{0, 8, 0, 0, 0},
{0, 0, 0, 0, 64},
{0, 0, 0, 0, 128},
{0, 0, 0, 1, 0},
{0, 0, 0, 2, 0},
{0, 16, 0, 0, 0},
{0, 32, 0, 0, 0},
{0, 64, 0, 0, 0},
{0, 128, 0, 0, 0},
{0, 0, 0, 4, 0},
{0, 0, 0, 8, 0},
{0, 0, 0, 16, 0},
{0, 0, 0, 32, 0},
{1, 0, 0, 0, 0},
{2, 0, 0, 0, 0},
{4, 0, 0, 0, 0},
{8, 0, 0, 0, 0},
{0, 0, 0, 64, 0},
{0, 0, 0, 128, 0},
{0, 0, 1, 0, 0},
{0, 0, 2, 0, 0},
{16, 0, 0, 0, 0},
{32, 0, 0, 0, 0},
};
const int Nled = sizeof(leds)/L;
char s [90];
// -----------------------------------------------------------------------------
void dispVertical (
int n )
{
for (int b = 0; b < 8; b++) {
for (int l = 0; l < L; l++) {
char c = '_';
if (leds [n][l] & 1 << b)
c = '*';
Serial.print (c);
}
Serial.println ();
}
Serial.println ();
}
// ---------------------------------------------------------
void dispHorizontal (
int n )
{
for (int l = 0; l < L; l++) {
for (int b = 0; b < 8; b++) {
char c = '_';
if (leds [n][l] & 1 << b)
c = '*';
Serial.print (c);
}
Serial.println ();
}
Serial.println ();
}
// ---------------------------------------------------------
void dispLine (
int n )
{
#if (1)
sprintf (s, " %2d: ", n);
Serial.print (s);
#endif
for (int l = 0; l < L; l++) {
for (int b = 0; b < 8; b++) {
char c = '_';
if (leds [n][l] & 1 << b)
c = '*';
Serial.print (c);
}
Serial.print (" ");
}
Serial.println ();
}
// -----------------------------------------------------------------------------
void setup ()
{
Serial.begin (9600);
for (int n = 0; n <Nled; n++)
dispLine (n);
}
// -----------------------------------------------------------------------------
void loop ()
{
}
values wouldbe easier if specifed as hex 0xA5 or binary, B10100101