https://projects.raspberrypi.org/en/pro ... mputing/11
What I want to do is to read light/dark using this set-up and in Raspbian (using the Mu program) I'm running the following code (also available in the previous link):
from gpiozero import LightSensor, Buzzer
ldr = LightSensor(4) # alter if using a different pin
while True:
print(ldr.value)
It's supposed to be printing out values of the readings of light/dark accordingly but all the outputs I've been having are simply loads of zeroes (regardless if it's light or dark):
0.0
0.0
0.0
Any idea what may be causing this error in the readings?