Skip to content

Commit 82a566f

Browse files
authored
Merge pull request #131 from RaspberryPiFoundation:130-missing-documentation-for-motionsensor-class
Add missing documentation for MotionSensor class
2 parents 6ea3150 + 8c1a2e4 commit 82a566f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Change log
33

44
.. currentmodule:: picozero
55

6+
0.5.0 - TBD
7+
-----------
8+
9+
+ Introduced ``MotionSensor`` class for PIR sensors
10+
611
0.4.2 - 2023-05-12
712
------------------
813

docs/recipes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ Turn the :obj:`pico_led` on when a :class:`Button` is pressed and off when it is
145145

146146
.. literalinclude:: examples/button_led.py
147147

148+
Motion sensor
149+
-------------
150+
151+
Detect motion using a PIR (Passive Infrared) sensor:
152+
153+
.. literalinclude:: examples/motion_sensor.py
154+
155+
Use callbacks to respond to motion events:
156+
157+
.. literalinclude:: examples/motion_sensor_callbacks.py
158+
148159
RGB LEDs
149160
--------
150161

0 commit comments

Comments
 (0)