x18 LDR Photoresistors


I'm currently thinking about how to build project with 18 ldr photoresistors. Normally the ldr input data into the analog pin. Looking at the Arduino Mega which only has 15 analog pins.

I was wondering how I would get around this. For example I thought about building an array of the photoresistors but I can't find anything online about how to do this.

The reason for using a Arduino Mega is that this project will also be using 18 Neopixel rings, separate power supply and a water pump. Any other suggestions are welcome. These resistors will be spread out and imbedded over a large floorspace with a Neopixel ring around each one. The data from the resistors is used like a puzzle to turn off the water pump (wall of water to get through).


Use a digital output to switch batches of ldrs to the analog inputs .

You can use analog multiplexer. For example - Ximimark 5Pcs 16CH Analog Digital Multiplexer Breakout Board Module CD74HC4067 CMOS Precise Module For Arduino - - Amazon.com