the circuit is just a phototransistor and a resistor for the detector, I added a IR led next to it as well so it works in the dark. I sample the ADC every few ms and calculate the difference from previous/last sample, to get a delta value, and just trigger some flahsy lights if the delta exceeds the threshold value, which controls how sensitive the trigger is.
I now have 1 pin left to do something with (I used it for debug output to see what my adc output was, thinking of using it to trigger adjacent modules perhaps, to create a cascading effect perhaps)
funny didn't intend to build this earlier, but it's kinda fun, so I'll just keep going with it and see what I can get this tiny pic to do..
and the 12f1822 is dirt cheap so perhaps I'll build a few dozen at least and
see how it goes.
Bookmarks