Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add documentation for MotionSensor and Stepper classes
- Add MotionSensor section to recipes.rst (missing from previous merge)
- Add Stepper section to recipes.rst with comprehensive examples
- Update changelog.rst with v0.5.0 entries for both classes
- Organize motor sections together for better flow
  • Loading branch information
pjbRPF committed Oct 17, 2025
commit b97feaf685dd48cbc8b875c8a207758db3d502a6
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Change log

.. currentmodule:: picozero

0.5.0 - TBD
-----------

+ Introduced ``MotionSensor`` class for PIR sensors
+ Introduced ``Stepper`` class for stepper motor control
+ Added comprehensive stepper motor API with multiple control methods

0.4.2 - 2023-05-12
------------------

Expand Down
22 changes: 22 additions & 0 deletions docs/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,35 @@ Move the rover (roughly) in a square:

.. literalinclude:: examples/robot_rover_square.py

Stepper motor
-------------

Control a stepper motor connected via a driver board (e.g. ULN2003):

.. literalinclude:: examples/stepper.py

Advanced positioning with precise angle control:

.. literalinclude:: examples/stepper_positioning.py

Internal temperature sensor
---------------------------

Check the internal temperature of the Raspberry Pi Pico in degrees Celcius:

.. literalinclude:: examples/pico_temperature.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

Ultrasonic distance sensor
--------------------------

Expand Down