Please review the schematic diagram. The photocell and the 1K ohm resistor works like a voltage divider. The resistance in the photocell varies with light, which causes the voltage read across 1K resistor to change from very little to almost 4.5V. A0 reads the voltage value between the two components.
u deserve more than 2.5k subs
What is the purpose of the 1kohm resistor between the photocell and ground?
Please review the schematic diagram. The photocell and the 1K ohm resistor works like a voltage divider. The resistance in the photocell varies with light, which causes the voltage read across 1K resistor to change from very little to almost 4.5V. A0 reads the voltage value between the two components.
Why divide by 2?