#define pinA 34
#define pinB 35
#define pinC 32
#define pinD 33
#define pinE 25
#define pinF 26
#define pinG 27
#define display1 0
#define display2 2
void numero1();
void numero2();
void setup()
{
pinMode(pinA, OUTPUT);
pinMode(pinB, OUTPUT);
pinMode(pinC, OUTPUT);
pinMode(pinD, OUTPUT);
pinMode(pinE, OUTPUT);
pinMode(pinF, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(display1, OUTPUT);
pinMode(display2, OUTPUT);
digitalWrite(pinA, LOW);
digitalWrite(pinB, LOW);
digitalWrite(pinC, LOW);
digitalWrite(pinD, LOW);
digitalWrite(pinE, LOW);
digitalWrite(pinF, LOW);
digitalWrite(pinG, LOW);
digitalWrite(display1, HIGH);
digitalWrite(display2, HIGH);
}
void loop()
{
digitalWrite(display2, LOW);
numero1();
digitalWrite(display1, HIGH);
delay(10);
digitalWrite(display1, LOW);
numero2();
digitalWrite(display2, HIGH);
delay(10);
}
void numero1()
{
digitalWrite(pinA, 1);
digitalWrite(pinB, 0);
digitalWrite(pinC, 0);
digitalWrite(pinD, 1);
digitalWrite(pinE, 1);
digitalWrite(pinF, 1);
digitalWrite(pinG, 1);
}
void numero2()
{
digitalWrite(pinA, 0);
digitalWrite(pinB, 1);
digitalWrite(pinC, 0);
digitalWrite(pinD, 0);
digitalWrite(pinE, 1);
digitalWrite(pinF, 0);
digitalWrite(pinG, 0);
}