Skip to content

Commit 5f02c87

Browse files
committed
Copy edit
1 parent 5fe70be commit 5f02c87

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pir.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Passive Infrared Motion Sensor (PIR)
1+
# Passive infrared motion sensor (PIR)
22

3-
Humans and other animals emit radiation all the time. This is nothing to be concerned about though, as the type of radiation we emit is called Infrared radiation (IR), which is pretty harmless at the levels emitted by humans. Infact, all objects above absolute zero (-273.15C) emit IR radiation.
3+
Humans and other animals emit radiation all the time. This is nothing to be concerned about, though, as the type of radiation we emit is infrared radiation (IR), which is pretty harmless at the levels emitted by humans. In fact, all objects above absolute zero (-273.15C) emit IR radiation.
44

5-
A PIR sensor detects changes in the amount of IR radiation it receives. When there is a significant change in the amount of IR radiation it detects, then a pulse is triggered. This means that a PIR sensor can detect when a human moves infront of it (or indeed any animal).
5+
A PIR sensor detects changes in the amount of IR radiation it receives. When there is a significant change in the amount of IR radiation it detects, then a pulse is triggered. This means that a PIR sensor can detect when a human (or any animal) moves in front of it.
66

77
![pir](images/pir_module.png)
88

9-
## Wiring a PIR sensor.
9+
## Wiring a PIR sensor
1010

11-
The pulse emitted when a PIR detects motion needs to be amplified, and so it needs to be powered. There are three pins on the PIR, and they should be labled `Vcc`, `Gnd` and `Out`. If these labels aren't clear, they are sometimes concealed beneath the fresnel lens (the white cap), which you can temporarily remove to see the pin labels.
11+
The pulse emitted when a PIR detects motion needs to be amplified, and so it needs to be powered. There are three pins on the PIR; they should be labelled `Vcc`, `Gnd`, and `Out`. If these labels aren't clear, they are sometimes concealed beneath the Fresnel lens (the white cap), which you can temporarily remove to see the pin labels.
1212

1313
![wiring](images/pir_wiring.png)
1414

1515
1. As shown above, the `Vcc` pin needs attaching to a `5V` pin on the Raspberry Pi.
16-
2. The `Gnd` pin on the PIR sensor can be attached to *any* ground pin on the Raspberry Pi.
17-
3. Lastly the `Out` pin needs to be connected to any of the GPIO pins.
16+
1. The `Gnd` pin on the PIR sensor can be attached to *any* ground pin on the Raspberry Pi.
17+
1. Lastly, the `Out` pin needs to be connected to any of the GPIO pins.
1818

19-
## Detecting Motion
19+
## Detecting motion
2020

21-
You can detect motion with the PIR using the code below.
21+
You can detect motion with the PIR using the code below:
2222

2323
```python
2424
from gpiozero import MotionSensor

0 commit comments

Comments
 (0)