O'Reilly logo

Arduino Project Handbook by Mark Geddes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required