Skip to content

Commit 2588b99

Browse files
docs: Add display.rotate().
1 parent 905577a commit 2588b99

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/display.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ Functions
7272
Note that the ``wait``, ``loop`` and ``monospace`` arguments must be specified
7373
using their keyword.
7474

75+
.. py:function:: rotate(degrees)
76+
77+
Rotate the images shown on the display. The ``degrees`` parameter can be
78+
any number, including a negative rotation, and it will be rounded to the
79+
nearest multiple of 90 degrees.
80+
7581
.. py:function:: on()
7682
7783
Use on() to turn on the display.

docs/microbit_micropython_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ The LED display is exposed via the `display` object::
7676
# scrolls a string across the display (more exciting than display.show for
7777
# written messages).
7878
display.scroll(string, delay=400)
79+
# Rotates the display 0, 90, 180 or 270 degrees.
80+
display.rotate(degrees)
7981

8082
SoundEvent **V2**
8183
-----------------

0 commit comments

Comments
 (0)