doc: document new media submodule

This commit is contained in:
Laurens Valk
2019-11-04 16:58:22 +01:00
parent 8f4468880b
commit 15f5626948
3 changed files with 30 additions and 6 deletions
+1
View File
@@ -26,6 +26,7 @@ Intro
parameters
tools
robotics
media
.. toctree::
:maxdepth: 1
+29
View File
@@ -0,0 +1,29 @@
:mod:`media` -- Sounds and Images
=============================================
You can use your own sound and image files by placing them in your project
folder. You can also use any of the images and sounds built into Pybricks.
ev3dev
------
These images and sounds are only available for Pybricks on ev3dev. Example::
# Imports
from pybricks.hubs import EV3Brick
from pybricks.media.ev3dev import SoundFile, ImageFile
# Initialize the EV3 brick
brick = EV3Brick()
# Show an image file
brick.display.image(ImageFile.AWAKE)
# Play a sound file
brick.speaker.file(SoundFile.HELLO)
.. autoclass:: pybricks.media.ev3dev.ImageFile
:no-members:
.. autoclass:: pybricks.media.ev3dev.SoundFile
:no-members:
-6
View File
@@ -36,12 +36,6 @@
.. autoclass:: pybricks.parameters.Align
:no-members:
.. autoclass:: pybricks.parameters.ImageFile
:no-members:
.. autoclass:: pybricks.parameters.SoundFile
:no-members:
.. autoclass:: pybricks.parameters.Axis
:no-members: