How would I use a photoresistor like a switch. My issue is it is always bleeding out a little bit of power and always on. Is there a way to connect it to a digital pin and when a resistance of xxx is ment, set another digital pin to On?
Asked
Active
Viewed 224 times
1 Answers
1
To turn an analog signal into a digital signal, at some sort of threshold xxx, you need to either condition it in electronic circuitry, with something like an amplifier or a comparator, or read the analog signal directly and apply the threshold in software.
You likely need to connect the photoresistor as half of a voltage divider, as in Why do you need a second resistor when using a photoresistor/LDR?