with my hobby projects I use a 10k pot,1k safety resistor and 10k photo cell
you can add a little "debounce delay " for the headlights and cal with the pot
Code:LDR=1 'POWER UP LIGHT SENSOR Pause 20 ADCIN 0,NIGHT 'READ AN1 & STORE IN NIGHT VAR PAUSE 250 IF NIGHT=<400 then IT'S DAY SO DO THIS IT'S NIGHT SO DO THIS Pause 25 LDR=0 'MAKE SURE LDR/ADCIN POWER IS OFF




Bookmarks