How much more or complicated is the coding if I want to add more than just 1 shift register? I have code available that is working for 1 shift reg. But say if I want to add a second or even third or fourth. What's the difference in the coding that I already have? I just needed the 8 led to light up in sequence from the first shift reg. To the second and so on.
You have to repeat the shiftOut statement for each of the separate bytes containing the shift register patterns, within the digitalWrite/s for the latchPin. The first byte goes through to the last register in the chain.
Paul_B sorry also forgot to mention I have no prior experience in any coding. When you say repeat the shiftout statement, could you show me how to do that?
Paul__B Hey I tried the codes, but it's not turning on all the way through than turn off like it should. I guess a better example would be like an Audi style light, one light on at a time and than once reach to the end of the line which is 16 less then cuts off and repeat.
Sorry, but I gave you code to demonstrate how to drive the chain of three or four shift registers with three or four bytes and which was sufficient to indicate how to adapt it for more or less shift registers. I used a quick generator for the three bytes as a demonstration which does different things to the bytes because I only wanted to demonstrate the principle.
I think you might have to study the code for a bit and figure out for yourself exactly what you want to display and how to code that - I'm a bit short on time just now.
Well you need one bit to control each LED. The Uno has 2K of read / write memory. You need some of this memory for the Arduino's running, so saying this is 0.5K, multiply 1500 by 8 to get 12000.
While the exact number will depend on the amount of read / right memory your code takes up this is nowhere close to the 32000 LEDs stated earlier.
Grumpy_Mike:
Please show me where that code of yours can do anything but turn all the LEDs on or off?
Apart from the fact that every bit you toggle the latch.
Its supposed to turn all LEDs on one by one. Wasn't the TO asking for this?