Files
pybricks-api/doc/api/hubs/movehub.rst
T
Laurens Valk c14f1cf473 api/hubs/MoveHub: add basic imu
This is similar to the other hubs, but with reduced functionality.
2021-02-17 23:23:40 +01:00

48 lines
1.0 KiB
ReStructuredText

Move Hub
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _fig_movehub:
.. figure:: ../../api/images/movehub_label.png
:height: 15 em
.. autoclass:: pybricks.hubs.MoveHub
:no-members:
.. rubric:: Using the hub status light
.. automethod:: pybricks.hubs::MoveHub.light.on
.. automethod:: pybricks.hubs::MoveHub.light.off
.. automethod:: pybricks.hubs::MoveHub.light.blink
.. automethod:: pybricks.hubs::MoveHub.light.animate
.. rubric:: Using the IMU
.. automethod:: pybricks.hubs::MoveHub.imu.up
.. automethod:: pybricks.hubs::MoveHub.imu.acceleration
.. rubric:: Using the battery
.. automethod:: pybricks.hubs::MoveHub.battery.voltage
.. automethod:: pybricks.hubs::MoveHub.battery.current
Status light examples
---------------------
Turning the light on and off
******************************
.. literalinclude::
../../../examples/pup/hub_movehub/light_off.py
Making the light blink
******************************
.. literalinclude::
../../../examples/pup/hub_movehub/light_blink.py