user55492: i am a Arduino beginner here. I start knowing about Arduino since my supervisor give me this project. In my project , i need to invent a car safety system to avoid animal hurting that hide under vehicle and solve drowsy driving problem. In sensor requirement, i choose to use PIR motion sensor (HC-SR501) to sense the movement of living things under the car, for the drowsy driving i choose to use pulse sensor and eye blink sensor to detect whether the driver is sleeping or not, it the driver is sleeping then it will activate alarm and led light on. But during research, i found that these 3 sensor have sharing the same pin with is the pin 2 (picture attach). So may is ask is possible to connect these all 3 sensor in one board ?? May i ask how can i do it if i connect the pins to the breadboard ??
Last question is do i need have MEMS MPU -6050 sensor in my project since i found this is with the eye blink sensor in other person research. Thank for accepting my question.




user42539: Your drawing seems to show plenty of pins available, with only pin 2 in common. If the pin is being used for an Interrupt, then one device can use a different pin instead and the code adapted to use PCINT for the interrupt.
I would suggest the PIR does not even need an interrupt, it is slow changing and polling it for activity would be just as effective.
Add some current limit resistors to your LEDs so you don't damage the IO pins.

55492: <p>i am a Arduino beginner here. I start knowing about Arduino since my supervisor give me this project. In my project , i need to invent a car safety system to avoid animal hurting that hide under vehicle and solve drowsy driving problem. In sensor requirement, i choose to use PIR motion sensor (HC-SR501) to sense the movement of living things under the car, for the drowsy driving i choose to use pulse sensor and eye blink sensor to detect whether the driver is sleeping or not, it the driver is sleeping then it will activate alarm and led light on. But during research, i found that these 3 sensor have sharing the same pin with is the pin 2 (picture attach). So may is ask is possible to connect these all 3 sensor in one board ?? May i ask how can i do it if i connect the pins to the breadboard ??
Last question is do i need have MEMS MPU -6050 sensor in my project since i found this is with the eye blink sensor in other person research. Thank for accepting my question.</p>

<p><a href="https://i.stack.imgur.com/u4nLz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u4nLz.png" alt="pulse sensor"></a></p>

<p><a href="https://i.stack.imgur.com/DcWly.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DcWly.png" alt="pir motion sensor"></a></p>

<p><a href="https://i.stack.imgur.com/FDRUF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FDRUF.png" alt="mems mpu -6050 sensor"></a></p>
 42539: <p>Your drawing seems to show plenty of pins available, with only pin 2 in common. If the pin is being used for an Interrupt, then one device can use a different pin instead and the code adapted to use PCINT for the interrupt.</p>

<p>I would suggest the PIR does not even need an interrupt, it is slow changing and polling it for activity would be just as effective.</p>

<p>Add some current limit resistors to your LEDs so you don't damage the IO pins.</p>
