Hello,
I want to install around 50 LDR sensors on Arduino Mega (which has 56 digital pins). Is it possible to read the high/low values of all the sensors simultaneously? or will it lag since I need the real time values.
Secondly I need to measure the time for which each sensor experiences high/low, will it be possible to calculate this time in real time on Arduino or would you recommend to read the values only from Arduino and do the processing on maybe Matlab?
TheMemberFormerlyKnownAsAWOL:
How fast do you need? You didn't specify.
Well, technically he didn't, but:
hammadn95:
LDR sensors
tells me "not very fast". Even with a digitalRead() call to each one individually you can read all of them ten times over in the time it takes for one to react to changing light. No need to do PORTx register reads in this case, though it does make it a LOT faster
hammadn95:
Can you pls tell the time it will take for arduino to simultaneously perform the following process for each of the LDR sensor installed (total 56)
Depends on your program, whether you do this with integer math or floating point math, what you do with the result, etc.
Secondly, do you think that a better sensor then LDR is available in the market to minimize the response time as much as possible? pls mention here.
Just about any common phototransistor is orders of magnitude faster than the LDR... photodiodes may be even faster.