doc/pupdevices/InfraredSensor: split examples

Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
This commit is contained in:
Laurens Valk
2020-12-29 14:42:11 +01:00
parent d6bc72c3c1
commit ab1f58c2cc
+9 -8
View File
@@ -4,14 +4,6 @@ Infrared Sensor
.. figure:: ../../api/images/sensor_proximity.png
:width: 35 %
.. toggle-header::
:header: **Show/hide example**
**Example: Measuring distance, object count, and reflection**
.. literalinclude::
../../../examples/pup/sensor_infrared/basics.py
.. autoclass:: pybricks.pupdevices.InfraredSensor
:no-members:
@@ -20,3 +12,12 @@ Infrared Sensor
.. automethod:: pybricks.pupdevices.InfraredSensor.reflection
.. automethod:: pybricks.pupdevices.InfraredSensor.count
Examples
-------------------
Measuring distance, object count, and reflection
************************************************
.. literalinclude::
../../../examples/pup/sensor_infrared/basics.py