This is the English section for bootloader and uploading issues.
There are about 13 bugs in your sketch, I marked them with // ?
You have not replied to the answers in your previous question.
This compiles without error or warning and should display the digits 0 through 9 repeatedly on the seven-segment display connected to pins 2 through 8.
const int pins[7] = {2, 3, 4, 5, 6, 7, 8 };
const byte numbersDisplayAnode[10] =
{
0b1000000, //0;
0b1111001, //1;
0b0100100, //2;
0b0110000, //3;
0b0011001, //4;
0b0010010, //5;
0b0000010, //6;
0b1111000, //7;
0b0000000, //8;
0b0010000, //9;
};
void setup()
{
for (int i = 0; i < 7; i++)
{
pinMode(pins[i], OUTPUT);
}
// Display 0 on the seven-segment display.
lightSegments (0) ;
}
void loop()
{
// Display 0 through 9 on the seven-segment display.
for (int i = 0; i < 10; i++)
{
lightSegments(i);
delay(1000);
}
}
// Display a digit on the seven-segment display.
// WARNING: 'number' must be 0 through 9 only.
void lightSegments(int number)
{
// Get the pattern of segments from the lookup table
byte numberBit = numbersDisplayAnode[number];
// Dispay the pattern on the seven segments
for (int i = 0; i < 7; i++)
{
int bit = bitRead(numberBit, i);
digitalWrite(pins[i], bit);
}
}