I’d really like to know how to “”convert”” an analog value to a digital one. In a word : I have an Arduino, a photoresistor, with a pull-down resistor. I want to know if the light is above or below a given threshold.
I know how to read the value with analogRead(photoResPin), and compare it to my threshold (in code), but I’d like to do that without software (only using digitalRead), handling that threshold in hardware.
Can you help me ?
I guess I can use a transistor, but don’t know how to “”precisely”” set the threshold (by changing the pull-down resistor value ?).
How can I convert an analog value to a digital one? - [Link]