I have 5 LEDs in a circle, when I count through them 1 at a time counter clockwise it does what you'd imagine BUT when I try & go clockwise nothing happens?
Here is the snippet of code amended from the Arduino-Shift register example...
dataArray[0] = 0x10;
dataArray[1] = 0x08;
dataArray[2] = 0x04;
dataArray[3] = 0x02;
dataArray[4] = 0x01;
// Counter clockwise
for (int j = 0; j < 5; j++) {
//load the light sequence you want from array
data = dataArray[j];
//ground latchPin and hold low for as long as you are transmitting
digitalWrite(latchPin, 0);
//move 'em out
shiftOut(dataPin, clockPin, data);
//return the latch pin high to signal chip that it
//no longer needs to listen for information
digitalWrite(latchPin, 1);
delay(300);
}// Clockwise
for (int k = 4; k < 0; k--) {
//load the light sequence you want from array
data = dataArray[k];
//ground latchPin and hold low for as long as you are transmitting
digitalWrite(latchPin, 0);
//move 'em out
shiftOut(dataPin, clockPin, data);
//return the latch pin high to signal chip that it
//no longer needs to listen for information
digitalWrite(latchPin, 1);
delay(300);
}
So what am I missing here?
I thought that this would just read out dataArray backwards?!?!
Thanks
Nic