Hi,
what I did not found in the documentation …the call to
read_line_sensors_calibrated(sensor_values, readMode);
is blocking for the timeout …in worst case?
Could it be a better approach to let an ISR run in the background?
That would you give some clock cycles to do other things instead of polling in
a while loop …
//not sure if I got it right: while (time < _maxValue)
proposal: charge the capacitor every max timeout …and wait for
the interrupt of the sensor threshold interrupt …
read_line_sensors_calibrated(sensor_values, readMode);
could return immediately with the current values …even if the different
sensors are not consistant …as white will return much faster than black …
but you do not have better once
or you have a ISR which always returns as soon you have all sensors or timeout.
I fear a little bit to rewrite the whole lib.
(I´m more a script kid than a real programmer)