mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
67 lines
1.8 KiB
C++
67 lines
1.8 KiB
C++
.. autoclass:: pybricks.hubs.EV3Brick
|
|
:no-members:
|
|
|
|
.. rubric:: Using the buttons
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.buttons.pressed
|
|
|
|
.. rubric:: Using the brick status light
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.light.on
|
|
|
|
.. toggle-header::
|
|
:header: **Show/hide example**
|
|
|
|
**Example: Turn the light on and change the color.**
|
|
|
|
.. literalinclude:: ../../pybricks-projects/snippets/ev3/light_color/main.py
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.light.off
|
|
|
|
.. rubric:: Using the speaker
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.beep
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_notes
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_file
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.say
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_speech_options
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_volume
|
|
|
|
|
|
.. rubric:: Using the screen
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.clear
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_text
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.print
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.set_font
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.show_image
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_image
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_pixel
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_line
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_box
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_circle
|
|
|
|
.. autoattribute:: pybricks.hubs::EV3Brick.screen.width
|
|
|
|
.. autoattribute:: pybricks.hubs::EV3Brick.screen.height
|
|
|
|
.. rubric:: Using the battery
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.battery.voltage
|
|
|
|
.. automethod:: pybricks.hubs::EV3Brick.battery.current
|