Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add display.rotate(). #808

Draft
wants to merge 1 commit into
base: v2-docs
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/display.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ Functions
Note that the ``wait``, ``loop`` and ``monospace`` arguments must be specified
using their keyword.

.. py:function:: rotate(degrees)

Rotate the images shown on the display. The ``degrees`` parameter can be
any number, including a negative rotation, and it will be rounded to the
nearest multiple of 90 degrees.

.. py:function:: on()

Use on() to turn on the display.
Expand Down
2 changes: 2 additions & 0 deletions docs/microbit_micropython_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ The LED display is exposed via the `display` object::
# scrolls a string across the display (more exciting than display.show for
# written messages).
display.scroll(string, delay=400)
# Rotates the display 0, 90, 180 or 270 degrees.
display.rotate(degrees)

SoundEvent **V2**
-----------------
Expand Down