Hi I am new to electronics, and I have made a light tripwire using an Arduino Uno. I made this on the idea that electricity follows the path of least resistance, which I now know to be false (https://physics.stackexchange.com/questions/5670/electricity-takes-the-path-of-least-resistance). False or not however, my tripwire works exactly as I would expect it to.
I programmed my board to sound an alarm if pin 2 reads low voltage I thought it worked because if the photoresistor has less resistance than the resistor, then it would read high voltage and vice versa. So can anyone explain what is happening?
simulate this circuit – Schematic created using CircuitLab