Go Down

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

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.

PHOTOGUY

i wish somebody could have posted a code :( searched all github and google but could not find such a code..

Marmotjr

i wish somebody could have posted a code :( searched 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. 

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy