I'm using a Raspberry Pi 3+ alongside a breadboard, a capacitor (1uf, 63v), three jumpers, and an analogue light sensor(also called light-dependent resistor or photocell). In fact, I'm using the exact same circuit as described here in the official Raspberry Pi website (chapter "Physical Computing with Python: Using a light-dependent resistor"):
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
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):
Any idea what may be causing this error in the readings?