I'm trying to set up my raspberry pi to log input from an LDR. I've found some information which seem to cover exactly what I need, but I can't make it work.
Here's a link: http://pyevolve.sourceforge.net/wordpress/?p=2383
I've built the circuit and it works fine - if I connect an LED to the output it responds to a changing light level on the LDR. The problem comes when I connect that output to the Pi, the level of the GPIO pin seems to change at random, unrelated to the output from the circuit.
I've tried both python RPi.GPIO and the wiringPi gpio utility, both provide the same result. It seems like the input is floating but I've tried both internal and external pullup & pulldown resistors, neither improved the situation.
I feel like I'm missing something obvious but I'm clearly beyond the limits of my knowledge so I'm hoping someone else will have some useful insight! No idea too daft, I'll try anything