int a = 3;
int b = 4;
int c = 5;
int d = 6;
int e = 7;
int f = 8;
int g = 9;
const int numbers[10][7] = {
{1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 0, 0, 0, 0},
{1, 1, 0, 1, 1, 0, 1},
{1, 1, 1, 1, 0, 0, 1},
{0, 1, 1, 0, 0, 1, 1},
{1, 0, 1, 1, 0, 1, 1},
{1, 0, 1, 1, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 0, 1, 1}
};
void setup() {
for (int i = a; i <= g; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
for (int num = 9; num >= 0; num--) {
displayNumber(num);
delay(1000);
}
}
void displayNumber(int num) {
for (int i = a; i <= g; i++) {
digitalWrite(i, numbers[num][i - a]);
}
}