In the next few lessons, you are going to learn how to detect movement with a Pir sensor and your Raspberry
Pi.
But before that, let's get a bigger picture of where we are right now in the course.
At this point, you already have a good foundation with Raspberry Pi, Python three and the Gpio.
This foundation is extremely important and will help you in the future.
From now on with each section, you will discover new functionalities and fun features that you can
implement on your Raspberry Pi.
And then at the end of the course, we will do a nice project together where you will use all the knowledge
you got from all the sections from this course.
So for now you have basics in Raspberry Pi in general in Python three and Gpio.
What we are going to do is to focus on using a Pir sensor to be able to detect some movements with your
Raspberry Pi.
And first, what is a Pir sensor?
Pir means passive infrared.
We as human are emitting some infrared light which depends on the temperature of our body.
We cannot see the infrared light with our eyes, but the Pir sensor can detect it.
And in fact, the Pir sensor will detect variations of that infrared light, which means, in other
words, movement.
So basically a Pir our sensor will measure the infrared radiation in front of it and detect movement.
Note that the Pir will not be able to specifically detect if there is someone inside its range.
Okay, if you are in the range of a Pir sensor and you don't move, then the Pir sensor won't detect
you.
You have to make some movement so that the Pir sensor detects something in real life.
Pir sensors are used everywhere, and you have probably seen some of them to automatically turn on a
light, to trigger an alarm, etc..
And so this is the Pir sensor we will use here with this photo.
And the model reference is HC-SR5 hundred and one.
It might look like a complicated name, but it's actually a super common component and it will be quite
easy to use.
So the output of this sensor is very simple.
It is a binary output.
Either there is a movement which has been detected or not.
We will use Gpio to control the sensor.
And you will see that if you know how to read data from a push button, then reading data from the Pir
sensor will be quite easy.
And at the end of this section, you will be able to connect the Pir sensor to your circuit to read
and interpret the component data in your Python program.
Let's get started.