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