Help with Multiple PIR sensors, servos and RGB LED running at the same time

Hello,

I'm new in the Arduino field and need help!

I am trying to run multiple PIR sensors, each one of those connected to 1 servo motor and 1 RGB Led, at the moment I'm working just with 2 PIR but ultimately I would like to end up with 5.

The idea is that whenever a PIR sensor activates the servo attached to it starts running and the Led lightens up. I've managed to make the two PIR activations work but the first one needs to finish before the second one gets activated.

I understand that this is happening because the Arduino reads the code down, so what do I have to do to make the Arduino read the activations at the same time?

I leave my code attached to this message.

Im sorry if this is a rather confusing description of what i am trying to do so feel free to ask questions and thank you for your help :slight_smile:

PIR_LED_09.ino (5.77 KB)