'Recognizing the need is the primary condition for design.'
1X Distance / Proximity sensor
1X Passive buzzer
1X Red LED
1X Green LED
3X 10k resistors
Use the instructions below with the image gallery to connect the components as follows:
5V + and - GND power from board to breadboard
1: Connect the 5V+ on the mega board to the + red rail on the breadboard, then connect the GND on the mega board to the - blue rail on the breadboard.
Distance / Proximity
2. Connect the PIR motion sensor's Ecco pin to digital pin 6 of the Arduino Mega then, Connect Trigger pin on the sensor to digital pin 7 of the Arduino Mega, Then connect VCC 5V+ and GND of the sensor to the power + 5V and negative -0V rails on the breadboad.
3. Connect one terminal of the buzzer to digital pin 9 of the Arduino Mega. Connet the other terminal to 5V+ on the breadboard power rail.
4. Connect the positive (long leg) terminal of each LED to digital pins 2(Green), 3(Yellow), and 4(Red) of the Arduino Mega. .
5. Connect the other (short leg) terminal of each LED to GND (ground) of the Arduino Mega, using a resistor in series if required (depending on the LED specifications).