From 8c1a2e4b627526f2ac0ce7b8c5ae2848fcdb2308 Mon Sep 17 00:00:00 2001 From: Pete Bell Date: Fri, 17 Oct 2025 16:59:44 +0100 Subject: [PATCH] Add missing documentation for MotionSensor class --- docs/changelog.rst | 5 +++++ docs/recipes.rst | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 78a08eb..8c397cc 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,6 +3,11 @@ Change log .. currentmodule:: picozero +0.5.0 - TBD +----------- + ++ Introduced ``MotionSensor`` class for PIR sensors + 0.4.2 - 2023-05-12 ------------------ diff --git a/docs/recipes.rst b/docs/recipes.rst index 9887689..f0e29bf 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -145,6 +145,17 @@ Turn the :obj:`pico_led` on when a :class:`Button` is pressed and off when it is .. literalinclude:: examples/button_led.py +Motion sensor +------------- + +Detect motion using a PIR (Passive Infrared) sensor: + +.. literalinclude:: examples/motion_sensor.py + +Use callbacks to respond to motion events: + +.. literalinclude:: examples/motion_sensor_callbacks.py + RGB LEDs --------