//A B C D E F G DP
const uint8_t PIN[8]={5,4,6,9,8,10,11,7};
// A B C D E F G DP
// bool segmen[8]={true,false,true,true,true,true,true,false};
// A B C D E F G DP
// bool segmen[8]={1,0,1,1,1,1,1,0};
bool alfabet[11][8]={ // Array 2 dimensi
{1,1,1,1,1,1,0,0}, //0
{0,1,1,0,0,0,0,0}, //1
{1,1,0,1,1,0,1,0}, //2
{1,1,1,1,0,0,1,0}, //3
{0,1,1,0,0,1,1,0}, //4
{1,0,1,1,0,1,1,0}, //5
{1,0,1,1,1,1,1,0}, //6
{1,1,1,0,0,0,0,0}, //7
{1,1,1,1,1,1,1,0}, //8
{1,1,1,1,0,1,1,0}, //9
{1,1,1,0,1,1,1,0} //A
};
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(int i=0; i<11; i++){
for(int j=0;j<8;j++){
if (alfabet[i][j]==true){
digitalWrite(PIN[j], HIGH);
} else {
digitalWrite(PIN[j], LOW);
}
}
delay(800);
}
}