Skip to main content
1 of 2
goldilocks
  • 60.1k
  • 17
  • 115
  • 230

I won't claim this is a very complete answer, but here goes:

I tried simply connecting my module...

The capacitor in that Adafruit demo plays a vital role; it's what creates a fluctuating high/low signal which can be read as a digital frequency (see here). Without that, the corresponding code will not be good for much.

Can I use the module with an approach similar

Probably yes -- with a capacitor.

Without a capacitor, you might be able to get the photoresistor to register a change from very bright to very dark, if it can offer up enough change in resistance to make the difference between a "high" and "low" signal.

Attach a GPIO as an output to VCC set to high,1 and another one to SIG as an input, and of course, a ground to GND. Cover the resistor and check the state of the input, then try shining a very bright light on it and check again. You don't need/can't use the Adafruit code for this since again, that is not the principle it works upon.

I have no idea if that will work but it is simple enough to try and should not damage anything.


1. Don't use a 3.3V power pin. Use a GPIO output.

goldilocks
  • 60.1k
  • 17
  • 115
  • 230