CD4028BE BCD to Decimal Decoder

Used Products:

1. Arduino UNO
2. CD4028BE

Code:

#define aPin 2 #define bPin 3 #define cPin 4 #define dPin 5 #define del 100 int matrix[][4] = { {0,0,0,0}, {0,0,0,1}, {0,0,1,0}, {0,0,1,1}, {0,1,0,0}, {0,1,0,1}, {0,1,1,0}, {0,1,1,1}, {1,0,0,0}, {1,0,0,1} }; void setup() { pinMode(aPin, OUTPUT); pinMode(bPin, OUTPUT); pinMode(cPin, OUTPUT); pinMode(dPin, OUTPUT); } void loop() { for (int i = 0; i < 10; i++) { digitalWrite(aPin, matrix[i][3]); digitalWrite(bPin, matrix[i][2]); digitalWrite(cPin, matrix[i][1]); digitalWrite(dPin, matrix[i][0]); delay(del); } }