const int A = 2;
const int B = 3;
const int C = 4;
const int D = 5;
const int E = 6;
const int F = 7;
const int G = 8;
int pin [7] = {A,B,C,D,E,F,G};
const int digitos [10] [7] {
/* {A,B,C,D,E,F,G}; */
/* 0 */ {0,0,0,0,0,0,1},
/* 1 */ {1,0,0,1,1,1,1},
/* 2 */ {0,0,1,0,0,1,0},
/* 3 */ {0,0,0,0,1,1,0},
/* 4 */ {1,0,0,1,1,0,0},
/* 5 */ {0,1,0,0,1,0,0},
/* 6 */ {0,1,0,0,0,0,0},
/* 7 */ {0,0,0,1,1,1,1},
/* 8 */ {0,0,0,0,0,0,0},
/* 9 */ {0,0,0,0,1,0,0}
};
void setup() {
// put your setup code here, to run once:
for (int i = 0 ; i<7; i++){
pinMode(pin[i], OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for (int i = 0 ; i<10; i++){
Numero(i);
delay(1000);
}
}
void Numero (int N){
for (int i = 0; i<10;i++){
digitalWrite(pin[i],digitos[N][i]);
}
}