Help me please!
I do not understand how to connect the LED so that it blinks synchronously with the displayed digit in the com port.
If it is printed 1 it should blink once, 9 times nine times.
int dig1 ;
int dig2;
int dig3;
int dig4;
void setup()
{
Serial.begin(9600); //
Serial.print( " GO " );
}
void loop()
{
int dig1, dig2, dig3, dig4; //
int keys[10] = { 0,1, 2, 3, 4, 5,
6, 7, 8, 9 }; //
//
for(dig1=1; dig1<10; dig1++-
{
for(dig2=1; dig2<10; dig2++-
{
for(dig3=1; dig3<10; dig3++-
{
for(dig4=1; dig4<10; dig4++=
{
Serial.print(keys[dig1]);
delay(400);
Serial.print(keys[dig2]);
delay(400);
Serial.print(keys[dig3]);
delay(400);
Serial.print(keys[dig4]);
delay(400);
Serial.println();
delay(1000);
}
}
}
}
}