Skip to content

Commit

Permalink
docs: Add display.rotate().
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Sep 16, 2024
1 parent 905577a commit 2588b99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 2588b99

Please sign in to comment.