Skip to content

Commit cefc700

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 b688054 commit cefc700

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Change log
77
-----------
88

99
+ Introduced ``MotionSensor`` class for PIR sensors
10+
+ Introduced ``TouchSensor`` class for capacitive touch sensors
1011

1112
0.4.2 - 2023-05-12
1213
------------------

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
Motion sensor
149160
-------------
150161

0 commit comments

Comments
 (0)