//Pin connected to ST_CP of 74HC595 int latchPin = 11; //Pin connected to SH_CP of 74HC595 int clockPin = 12; ////Pin connected to DS of 74HC595 int dataPin = 13; //holder for infromation you're going to pass to shifting function byte data = 0; int ledCol[8] = { 7,6,5,4,/*analog*/14,15,16,17 }; //interrupt #define ISR_FREQ 170 //740Hz // Sets the speed of the ISR - LOWER IS FASTER byte internalFrame[8] = { B10000000, B01000000, B00110000, B00001000, B00000100, B00000010, B00000001, }; void ledsetup() { for (int i = 0; i < 8; i++) pinMode(ledCol[i], OUTPUT); pinMode(pin_button_latch, OUTPUT); pinMode(pin_button_clock, OUTPUT); pinMode(pin_button_data, INPUT); pinMode(latchPin, OUTPUT); setISRtimer(); } void putByte(byte data) { byte i = 8; byte mask; while(i > 0) { mask = 0x01 << (i - 1); // get bitmask digitalWrite( pin_button_clock, LOW); // tick if (data & mask){ // choose bit digitalWrite(pin_button_data, HIGH);// send 1 }else{ digitalWrite(pin_button_data, LOW); // send 0 } digitalWrite(pin_button_clock, HIGH); // tock --i; // move to lesser bit } } void ledRun() { for (int j = 0; j < 8; j++) { for (int j = 0; j < 8; j++) { digitalWrite(ledCol[j], HIGH); } // digitalWrite(load, LOW); // begin // putByte(internalFrame[j]); //digitalWrite(load, LOW); // and load da shit //digitalWrite(load,HIGH); // digitalWrite(ledCol[j], LOW); // lightShiftPinB(internalFrame[j]); for (int i = 0; i < 8; i++) { lightShiftPinA(i); } } } ISR(TIMER1_COMPA_vect) { //Called when ISR triggers //stuff } void setISRtimer(){ // setup ISR timer TCCR1A = (1<=0; i--) { digitalWrite(myClockPin, 0); //if the value passed to myDataOut and a bitmask result // true then... so if we are at i=6 and our value is // %11010100 it would the code compares it to %01000000 // and proceeds to set pinState to 1. if ( myDataOut & (1<