PROJECT 18: INTRUDER SENSOR

IN THIS PROJECT, WE’LL USE AN ULTRASONIC SENSOR TO DETECT AN INTRUDER.

image
image

PARTS REQUIRED

• Arduino board

• Breadboard

• Jumper wires

• Four-pin HC-SR04 ultrasonic sensor

• Servomotor

• Red LED

• Green LED

• 2 220-ohm resistors

We’ll connect the intruder sensor to a servo and some LEDs so that when someone comes within a certain distance, a green LED turns off, a red LED turns on, and the servomotor moves (see Figure 18-1).

FIGURE 18-1:The LEDs alert you to an intruder.

HOW IT WORKS

This project is versatile and can be ...

Get Arduino Project Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.