api/pupdevices: add ColorSensor

Initial class without any methods for the SPIKE Color Sensor
This commit is contained in:
Laurens Valk
2020-05-27 13:58:30 +02:00
committed by laurensvalk
parent 2d3e85f531
commit 10b6808037
+22
View File
@@ -116,6 +116,28 @@ Color and Distance Sensor
.. automethod:: pybricks.pupdevices::ColorDistanceSensor.light.off
Color Sensor
^^^^^^^^^^^^^^^^^^^^^^^^^
.. todo:: Support for this sensor is not yet implemented. API is experimental.
.. figure:: ../api/images/sensor_color.png
:width: 35 %
.. autoclass:: pybricks.pupdevices.ColorSensor
:no-members:
.. rubric:: Built-in lights
This sensor has a 3 built-in lights. You can adjust the brightness of each
light. If you use the sensor to measure something afterwards, the light
automatically turns back on as needed for the measurement.
.. automethod:: pybricks.pupdevices::ColorSensor.lights.on
.. automethod:: pybricks.pupdevices::ColorSensor.lights.off
.. Tilt Sensor
.. ^^^^^^^^^^^^^^^^^^^^^^^^^