A simple PICAXE program can be used to make an led come on when its dark. The led acts as its own light sensor. I made it into an automatic turn-on candle.
'picaxe program to flicker led like a candle when dark start: input 1 'make pin 1 an input before reading with ADC pause 200 w0=0 main: low 1 'discharge led before reading input 1 random w0 'get numbers to set flicker rate readadc 1, b2 if b2 < 10 then dark goto main dark: 'led will flicker depending on value of b0 and b1 high 1 pause b0 low 1 pause b1 goto main
botronics 7 months ago