Hello again everyone!
Quick question-
Is it possible to send info across three shift registers using only one "shiftout"? It's not is it?
I have LEDs currently connected to each output on the 74HC595s for a total of 24 lights, and I need to light only single lights at a time, on command. Currently, if I wanted to light only the 5th LED in the middle register I am doing something like this:
digitalWrite(latch, 0);
shiftOut(data, clock, MSBFIRST, 0);
shiftOut(data, clock, MSBFIRST, 16);
shiftOut(data, clock, MSBFIRST, 0);
digitalWrite(latch, 1);
and I suppose what I am hoping for is a solution more like this:
digitalWrite(latch, 0);
shiftOut(data, clock, MSBFIRST, 0, 16, 0);
digitalWrite(latch, 1);
Would it maybe work if I used an array? So possibly...
byte shiftarray[] = {0, 16, 0};
for (byte i = 0, i < 3, i++) {
digitalWrite(latch, 0);
shiftOut(data, clock, MSBFIRST, shiftarray[i]);
digitalWrite(latch, 1);
}
Quite honestly, I have only just begun to grasp arrays, so maybe I am way off base. Thanks in advance for any help you are able to provide!
As a side note, a few of you have been helping me tremendously along my journey and I just wanted to let you all know I am making lots of progress with the BarBot! I now have all of my pumps and check valves- and I already have had it take an order over wifi from the iPad, and pour precise amounts of liquid! Granted, it was colored water and not actual booze yet... but it works anyways! I picked up some transistor arrays too (so cool they make these! I was planning on having to individually diode/resistor/transistor each one separately... ) And I picked up a big jug of Ferric Chloride to etch my own PCB when the time comes- that sounds fun! (I'm sure it will take a bit of practice though lol)
I gotta hit the sack for now, but I'll check back in the morning! Thanks Guys!