I'm trying to set-up a sketch and don't know where to start.
I want to have a PIR trigger multiple LEDs (using multiple pins) and as PIR continues to be triggered the light increases to brighten area being covered.
*I would really like to have a new set of LEDs come on as motion continues, but will be satisfied with all LEDs getting brighter with continued motion.
I've tried book, Arduino cookbook, using Google and cannot find sketch or basic foundation to build on.
Please help.
I've tried book, Arduino cookbook, using Google and cannot find sketch or basic foundation to build on.
That's hard to believe. There are plenty of examples around for reading from a PIR sensor. Are you having problems doing that?
There are plenty of examples showing how to fade an LED. That you want to do it in response to some external stimuli, rather than clock ticks, is completely irrelevant.
I would really like to have a new set of LEDs come on as motion continues
To do what you want would take more then one PIR one can only tell if your moving but with 3 you could tell where you moved and if it was from right to left or left to right
That would let you light the spot you moved into. One can't do that.
But for the
but will be satisfied with all LEDs getting brighter with continued motion.
Just wait for trigger then count time it's on and let that update your PWM that controls your leds
Pir High counter started leds on 50% 1 second passes leds 60% then 70 80 90 100 if you stay for 5 seconds.
i wish somebody could have posted a code searched all github and google but could not find such a code..
PHOTOGUY:
i wish somebody could have posted a codesearched all github and google but could not find such a code..
Code for exactly what the OP asked for (2+ years ago)? It'd be pretty specific to his setup....
The PIR I have has adjustable settings, so multiple triggers from one sensor is possible, but not directionally (reread OP).
Just attach an interrupt to the PIR, and when that fires, increase the brightness by a set increment.