I can't figure it out what is the problem with my circuit, the segments turning on for sec and then they are turning off for good.
I tried to connect to GND instead of the 5 V but then, nothing happened.
My code:
void setup() {
for (int pin = 2 ; pin < 9 ; pin++){ // setup pins 2 – 8 to be output
pinMode(pin, OUTPUT);
}
for (int pin = 2 ; pin < 9 ; pin++){ // turn on pins 2 - 8
digitalWrite(pin, HIGH);
}
}
void loop(){}