Go Down

Topic: Using PIR & multiple LEDs that get brighter over repeated triggers (Read 432 times) previous topic - next topic

islandbehr

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.

PaulS

Quote
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.

be80be

Quote
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
Quote
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.

Go Up