mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
doc/inventorhub: expose hub in the docs
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
cityhub
|
||||
technichub
|
||||
primehub
|
||||
inventorhub
|
||||
ev3brick
|
||||
|
||||
.. figure:: ../images/movehub.png
|
||||
@@ -45,6 +46,14 @@
|
||||
:no-members:
|
||||
:noindex:
|
||||
|
||||
.. figure:: ../images/inventorhub.png
|
||||
:height: 8 em
|
||||
:target: inventorhub.html
|
||||
|
||||
.. autoclass:: pybricks.hubs.InventorHub
|
||||
:no-members:
|
||||
:noindex:
|
||||
|
||||
.. figure:: ../images/ev3brick.png
|
||||
:height: 8 em
|
||||
:target: ev3brick.html
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
MINDSTORMS Inventor Hub
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../api/images/inventorhub.png
|
||||
:height: 15 em
|
||||
|
||||
.. autoclass:: pybricks.hubs.InventorHub
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Using the hub status light
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide examples**
|
||||
|
||||
**Example 1: Turning the light on and off**
|
||||
|
||||
.. literalinclude::
|
||||
../../../pybricks-projects/snippets/pup/hub_inventorhub/light_off.py
|
||||
|
||||
**Example 2: Changing brightness and using custom colors**
|
||||
|
||||
.. literalinclude::
|
||||
../../../pybricks-projects/snippets/pup/hub_inventorhub/light_hsv.py
|
||||
|
||||
**Example 3: Making the light blink**
|
||||
|
||||
.. literalinclude::
|
||||
../../../pybricks-projects/snippets/pup/hub_inventorhub/light_blink.py
|
||||
|
||||
**Example 4: Creating light animations**
|
||||
|
||||
.. literalinclude::
|
||||
../../../pybricks-projects/snippets/pup/hub_inventorhub/light_animate.py
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.light.on
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.light.off
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.light.blink
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.light.animate
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.battery.voltage
|
||||
|
||||
.. automethod:: pybricks.hubs::InventorHub.battery.current
|
||||
|
||||
Reference in New Issue
Block a user