Verified Commit 5a68588d authored by Rahix's avatar Rahix
Browse files

docs: Document `vibra` module

Signed-off-by: Rahix's avatarRahix <>
parent 684ac29e
Pipeline #1314 passed with stages
in 5 minutes and 5 seconds
......@@ -23,6 +23,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
.. toctree::
:maxdepth: 1
``vibra`` - Vibration Motor
.. py:function:: vibra.vibrate(millis)
Turn on the vibration motor for a certain duration.
.. code-block:: python
import vibra
# Turn on vibration motor for 60 ms
:param int millis: Duration for the vibration motor to be on.
.. py:function:: vibra.set(state)
Permanently set the state of the vibration motor to either *on* or *off*.
.. warning::
If your code for some reason crashes between turning the motor on and
back off again, the motor will continue running. Consider using
:py:func:`vibra.vibrate` instead.
:param bool state: ``True`` to turn on, ``False`` to turn the motor off.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment