November 23, 2024, 02:59:39 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


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