Is Mux Shield II compatible with Leonardo?

I can't find any specific mention of whether the Mux Shield II is compatible with the Leonardo.

Based on the silkscreen, it looks like it should be, but I'd like to be certain before ordering one.

Hi, you should ask the vendor so that you can return the item if necessary. Do you need it for a specific project, or for general prototyping use? If the former, what devices do you need to connect? Maybe we can advise alternative ways to achieve.

Paul

I need about 30 analog input pins for a project involving photocells.

It could be done with an analog multiplexer/demultiplexer, but I wanted to keep it simple and just purchase the shield.

By "photocells" do you mean LDRs? If so, you could arrange them (electrically speaking) in a 5x6 matrix, each LDR having a diode in series. Then using 6 analog inputs and 5 digital outputs, scan the matrix to read the LDRs. No multiplexer required.

Yes, LDRs.

Would this matrix approach enable each individual LDR to be read individually?

Yes, individually, of course... what would be the point otherwise? :wink:

To prove it to yourself, you only need 2 LDRs. Put a diode in series with each. Connect each pair to an Arduino digital output to supply 5V. Connect the opposite ends to the same analog input. Connect that analog output to ground via a resistor, e.g. 10K. Then write a short sketch to set one output to high and the other to low. Read the analog input. Then change the two digital outputs over to low & high. Read the analog input again. You just read 2 LDRs on one digital input.

Next, take 2 more LDRs with diodes in series. Connect these to the same 2 digital outputs to supply 5V and their other ends to a second digital input, also with a 10K pulldown. Add more code to the sketch to read the second analog input. So far you have 4 Arduino input/outputs and you can read 4 LDRs. No advantage so far. But with 6 input/outputs you can read 9 LDRs, with 8 input/outputs you can read 16 LDRs and so on...