4 PIR + 4 LEDs Parallel detection

Hello guys,

I need your help, I have a setup with 4 PIR Sensors and 4 LED´s.
Now I want that the LEDs light up, depending which Sensor detect a movement.

My problem:
If I use "IF" than I can only fade in one LED and must wait until the Fading is done.
Than the next LED is fading in, and so on...
Can you tell me how to let it work in parallel? Because I want that in case of 2 detections 2 LED´s are going on. But on that way, it would not work :frowning:
Please help.

Thanks

petrk94:
If I use "IF" than I can only fade in one LED and must wait until the Fading is done.

Sounds like you are using a delay() in a fading loop to do timing. Look at the Blink Without Delay example to see how you can do periodic things without delay(). You will need variables to keep track of the state of each light: is it fading and how far into the fading has it gotten.