WEBVTT

00:00.080 --> 00:06.200
In the next few lessons, you are going to learn how to detect movement with a Pir sensor and your Raspberry

00:06.200 --> 00:06.710
Pi.

00:06.740 --> 00:11.660
But before that, let's get a bigger picture of where we are right now in the course.

00:11.690 --> 00:17.420
At this point, you already have a good foundation with Raspberry Pi, Python three and the Gpio.

00:17.720 --> 00:22.070
This foundation is extremely important and will help you in the future.

00:22.070 --> 00:28.370
From now on with each section, you will discover new functionalities and fun features that you can

00:28.370 --> 00:30.080
implement on your Raspberry Pi.

00:30.080 --> 00:35.540
And then at the end of the course, we will do a nice project together where you will use all the knowledge

00:35.540 --> 00:38.570
you got from all the sections from this course.

00:38.570 --> 00:43.910
So for now you have basics in Raspberry Pi in general in Python three and Gpio.

00:44.180 --> 00:50.600
What we are going to do is to focus on using a Pir sensor to be able to detect some movements with your

00:50.600 --> 00:51.410
Raspberry Pi.

00:51.410 --> 00:54.200
And first, what is a Pir sensor?

00:54.230 --> 00:56.990
Pir means passive infrared.

00:57.020 --> 01:03.140
We as human are emitting some infrared light which depends on the temperature of our body.

01:03.170 --> 01:08.510
We cannot see the infrared light with our eyes, but the Pir sensor can detect it.

01:08.510 --> 01:15.380
And in fact, the Pir sensor will detect variations of that infrared light, which means, in other

01:15.380 --> 01:16.730
words, movement.

01:16.730 --> 01:24.630
So basically a Pir our sensor will measure the infrared radiation in front of it and detect movement.

01:24.660 --> 01:31.230
Note that the Pir will not be able to specifically detect if there is someone inside its range.

01:31.260 --> 01:37.530
Okay, if you are in the range of a Pir sensor and you don't move, then the Pir sensor won't detect

01:37.530 --> 01:37.830
you.

01:37.860 --> 01:43.620
You have to make some movement so that the Pir sensor detects something in real life.

01:43.650 --> 01:49.860
Pir sensors are used everywhere, and you have probably seen some of them to automatically turn on a

01:49.860 --> 01:52.710
light, to trigger an alarm, etc..

01:52.710 --> 01:57.240
And so this is the Pir sensor we will use here with this photo.

01:57.240 --> 02:03.180
And the model reference is HC-SR5 hundred and one.

02:03.210 --> 02:08.280
It might look like a complicated name, but it's actually a super common component and it will be quite

02:08.280 --> 02:09.150
easy to use.

02:09.150 --> 02:12.000
So the output of this sensor is very simple.

02:12.000 --> 02:14.040
It is a binary output.

02:14.040 --> 02:18.090
Either there is a movement which has been detected or not.

02:18.120 --> 02:20.490
We will use Gpio to control the sensor.

02:20.490 --> 02:25.830
And you will see that if you know how to read data from a push button, then reading data from the Pir

02:25.830 --> 02:27.750
sensor will be quite easy.

02:27.750 --> 02:32.940
And at the end of this section, you will be able to connect the Pir sensor to your circuit to read

02:32.940 --> 02:36.360
and interpret the component data in your Python program.

02:36.360 --> 02:37.830
Let's get started.
