const byte digits[10] = {
0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3
0b01100110, // 4
0b01101101, // 5
0b01111101, // 6
0b00000111, // 7
0b01111111, // 8
0b01101111 // 9
};
const int Pins[] = {2, 3, 4, 5, 6, 7, 8};
const int ssd[] = {9,};
byte angka = 0;
int tombol = 12;
int tekan_ke = 0;
int nim[] = {1,2,4,6,5,0,1,9,8};
// int digit[10][7] = {
// {0, 0, 0, 0, 0, 0, 1}, //0
// {1, 0, 0, 1, 1, 1, 1}, //1
// {0, 0, 1, 0, 0, 1, 0}, //2
// {0, 0, 1, 0, 0, 1, 0}, //3
// {0, 0, 0, 0, 1, 1, 0}, //4
// {1, 0, 0, 1, 1, 0, 0},
// {0, 0, 0, 0, 0, 1, 0},
// {0, 0, 0, 1, 1, 1, 1},
// {0, 0, 0, 0, 0, 0, 0},
// {0, 0, 0, 0, 1, 0, 0}, //9
// };
int baris_ke;
void setup() {
// put your setup code here, to run once:
for (int i = 0; i < 9; i++){
pinMode(Pins[i], OUTPUT);
}
pinMode(tombol, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(tombol) == LOW) {
for (int x = 0;x<9;x++){
for(int i =0;i<=9;i++){
if(nim[x]==digits[i]){
}
}
}
delay(500);
}
}