Multiplex IR LED's?

Nvm my previous post I think I understand this now

Using these 74HC595's http://www.jaycar.com.au/productView.asp?ID=ZC4895&keywords=595&form=KEYWORD
And Hopefully if I can these ULN2803's http://australianrobotics.com.au/products/darlington-driver-8-channel-uln2803-dip (I might not be able to use it because I need to be able to pay by check)
if not this pricy one http://www.altronics.com.au/index.asp?area=item&id=Z3010

I was able to come up with a way that uses alot of shift registers and no multiplexing, and a way that uses heaps less shift registers and multiplexing

Anyway this is the multiplexing way I believe should work, I dont really know:

I guess to use this I will use the shift out command explained here (Not with same pins): - YouTube
and here:
http://www.arduino.cc/en/Tutorial/ShiftOut

I believe I can make this so only 1 LED is on at a time, that should work correct? FOr instance, if I do:
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, LOW);
shiftout(0, 1, MSBFIRST, 0);
shiftout(0, 1, MSBFIRST, 1);
shiftout(0, 1, MSBFIRST, 1);
digitalWrite(2, HIGH);
delay(10);
digitalWrite(2, LOW);
}
And the pins are:
Data 0
Clock 1
Latch 2

That should output Column 1, Row 1, which is the bottom left, then If I change it to this:
shiftout(0, 1, MSBFIRST, 4);
shiftout(0, 1, MSBFIRST, 0);
shiftout(0, 1, MSBFIRST, 3);

it would be Row 3 and Column 12, which is near the middle to the very right.

If this is correct I Yaaaay :stuck_out_tongue: ( I have not put in resistors because the darlington array made me weary of how it works, if I did put resistors in, should I just need 1 per row/column, and have them at 90 Ohms [R=V/I, R=(5-3.2)/0.02, R=90], Or will they get hot?)

Also I figured out how to use the photodiodes, by this guy: http://www.instructables.com/id/Infrared-Proximity-Sensing-Coffee-Table-Module/

I guess you place them in reverse bias and they can be used as voltage dividers :slight_smile:

Thanks again MIke :smiley: