const int strobePin = 8; const int clockPin = 9; const int dataPin = 10; void setup() { pinMode(strobePin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); // set up our pins as OUTPUTs digitalWrite(strobePin, LOW); //set the strobe low so it'll accept instruction shiftOut(dataPin, clockPin, LSBFIRST, 0x8F); // send the instruction to activate the board and set brightness to max digitalWrite(strobePin, HIGH); //we will always set the strobe high after the completion of each instruction and data set //sequential wrap-around example. digitalWrite(strobePin, LOW); //set strobe low for an instruction shiftOut(dataPin, clockPin, LSBFIRST, 0x40); //set up sequential addressing digitalWrite(strobePin, HIGH); //end of instruction, strobe must go high digitalWrite(strobePin, LOW); //start of data, strobe must go low shiftOut(dataPin, clockPin, LSBFIRST, 0xCA); // sets up the first address shiftOut(dataPin, clockPin, LSBFIRST, 0xFF); // sets up a 7 segment "A" shiftOut(dataPin, clockPin, LSBFIRST, 0x01); // turns on discrete LED shiftOut(dataPin, clockPin, LSBFIRST, 0xFF); // sets up a 7 segment "A" shiftOut(dataPin, clockPin, LSBFIRST, 0x01); // turns on discrete LED shiftOut(dataPin, clockPin, LSBFIRST, 0xFF); // sets up a 7 segment "A" shiftOut(dataPin, clockPin, LSBFIRST, 0x01); // turns on discrete LED shiftOut(dataPin, clockPin, LSBFIRST, 0xFF); // sets up a 7 segment "A" shiftOut(dataPin, clockPin, LSBFIRST, 0x01); // turns on discrete LED digitalWrite(strobePin, HIGH); // end of all data, strobe must go high } void loop() { // put your main code here, to run repeatedly: }