Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wink
firmware
Commits
5a68588d
Verified
Commit
5a68588d
authored
Jul 17, 2019
by
Rahix
Browse files
docs: Document `vibra` module
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
684ac29e
Pipeline
#1314
passed with stages
in 5 minutes and 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/index.rst
View file @
5a68588d
...
...
@@ -23,6 +23,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/overview
pycardium/color
pycardium/leds
pycardium/vibra
.. toctree::
:maxdepth: 1
...
...
Documentation/pycardium/vibra.rst
0 → 100644
View file @
5a68588d
``vibra`` - Vibration Motor
===========================
.. py:function:: vibra.vibrate(millis)
Turn on the vibration motor for a certain duration.
**Example**:
.. code-block:: python
import vibra
# Turn on vibration motor for 60 ms
vibra.vibrate(60)
: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.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment