//A B C D E F G DP
const uint8_t PIN[8]={5,4,6,9,8,4,11,7};
const uint8_t DIG[2]={7,6};
// A B C D E F G DP
// bool angka1[8]={false,true,true,false,false,false,false,false};
// A B C D E F G DP
bool angka0[8]={1,1,1,1,1,1,0,0}; // array 1 dimensi
bool angka1[8]={0,1,1,0,0,0,0,0};
byte angka2=B01011011;
void setup() {
// put your setup code here, to run once:
for(int i=0;i<8;i++){
pinMode(PIN[i], OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for(byte i=0;i<8;i++){
if(angka2 & (1<<i)){
digitalWrite(PIN[i],HIGH);
}
}
}