October 31, 2024, 09:29:57 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Light Dark Detector

Started by Jadams, July 23, 2010, 09:59:50 AM

Previous topic - Next topic

Jadams

I'm sure this isn't new to most, but it was to me.

I want to turn on an outside light when my light beam is tripped, but only after dark.  I used a photoresistor connected directly to the P6 header.  With a little simple code, it worked.

If Sensor = IsOn then Main
Relay = IsOn
PAUSE 30000
Relay = IsOff
Jim Adams