Skip to content

Commit 5ffd0d8

Browse files
committed
Add documentation for TouchSensor class
- Add TouchSensor section to recipes.rst with comprehensive examples - Update changelog.rst with v0.5.0 entry for TouchSensor class - Position TouchSensor logically after Buttons in input devices section
1 parent cf5a239 commit 5ffd0d8

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 ``TouchSensor`` class for capacitive touch 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+
Touch sensor
149+
------------
150+
151+
Detect touch using a capacitive touch sensor:
152+
153+
.. literalinclude:: examples/touch_sensor.py
154+
155+
Use callbacks to respond to touch events:
156+
157+
.. literalinclude:: examples/touch_sensor_callbacks.py
158+
148159
RGB LEDs
149160
--------
150161

0 commit comments

Comments
 (0)