Will it be like LDR and internal in series, thus making a voltage divider to an analog read pin
Yes, that's exactly it. In this case, we're not even using the pin as an analog input - we're just using it to detect a digital signal - a 1 or a 0.
in this case between 2 digital pins with one set to 0
Yes, this is just done for ease of wiring - one side is just GND
power consumption
The resistance of any LDR is less with more light - so really the biggest thing you can do to ensure low power consumption is to make sure that when you fit the Puck over the electrity meter, you try and cut out as much external light as possible.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi! I think you asked on YouTube as well?
Yes, that's exactly it. In this case, we're not even using the pin as an analog input - we're just using it to detect a digital signal - a 1 or a 0.
Yes, this is just done for ease of wiring - one side is just GND
The resistance of any LDR is less with more light - so really the biggest thing you can do to ensure low power consumption is to make sure that when you fit the Puck over the electrity meter, you try and cut out as much external light as possible.