@@ -32,7 +32,7 @@ Functions
3232 Display the ``image ``.
3333
3434
35- .. py :function :: show(iterable, delay, wait = True , loop = False , clear = False )
35+ .. py :function :: show(iterable, delay= 400 , \* , wait= True , loop= False , clear= False )
3636
3737 Display images or letters from the ``iterable `` in sequence, with ``delay ``
3838 milliseconds between them.
@@ -44,9 +44,32 @@ Functions
4444
4545 If ``clear `` is ``True ``, the display will be cleared after the iterable has finished.
4646
47+ Note that the ``wait ``, ``loop `` and ``clear `` arguments must be specified
48+ using their keyword.
4749
48- .. py :function :: scroll(string, delay = 400 )
50+ .. py :function :: scroll(string, delay= 150 , \* , wait = True , loop = False , monospace = False )
4951
5052 Similar to ``show ``, but scrolls the ``string `` horizontally instead. The
51- ``delay `` parameter controls how fast the text is scrolling. This function
52- blocks until it is finished.
53+ ``delay `` parameter controls how fast the text is scrolling.
54+
55+ If ``wait `` is ``True ``, this function will block until the animation is
56+ finished, otherwise the animation will happen in the background.
57+
58+ If ``loop `` is ``True ``, the animation will repeat forever.
59+
60+ If ``monospace `` is ``True ``, the characters will all take up 5 pixel-columns
61+ in width, otherwise there will be exactly 1 blank pixel-column between each
62+ character as they scroll.
63+
64+ Note that the ``wait ``, ``loop `` and ``monospace `` arguments must be specified
65+ using their keyword.
66+
67+ Example
68+ =======
69+
70+ To continuously scroll a string across the display, and do it in the background,
71+ you can use::
72+
73+ import microbit
74+
75+ microbit.display.scroll('Hello!', wait=False, loop=True)
0 commit comments