int latchPin = 5;
int clockPin = 18;
int dataPin = 19;
int num[] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x71};
void setup() {
// put your setup code here, to run once:
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
digitalWrite(latchPin, HIGH);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=0; i<16; i++) {
DataOut(num[i]);
delay(100);
}
Serial.println("3");
}
void DataOut(byte data) {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, data);
digitalWrite(latchPin, HIGH);
}