25 sensors 5 rows × 5 columns pins (`see SparkFun`_):: 14 23 1. phototransistor collector, to pull-up for row 2. phototransistor emitter, to ground for column 3. led anode, to limiter for row 4. led cathode, to ground for column so… :: aM aM aM aM aM cN cN cN cN cN 14 14 14 14 14 14 14 14 14 14 … 23 23 23 23 23 23 23 23 23 23 … Mb Mb Mb Mb Mb Nd Nd Nd Nd Nd /---------- input1 a -+-10kΩ--+- output1 b ---220Ω--/ /---------- input2 c -+-10kΩ--+- output2 d ---220Ω--/ … … M ------------ output6 N ------------ output7 .. `see SparkFun`: https://learn.sparkfun.com/tutorials/qrd1114-optical-detector-hookup-guide/all