Closed
Description
Reported in the V1 repository, but I think it's actually a V2 only issue:
With this programme pressing button A should stop the animation looping forever by using display.clear()
, but it only clears the current image displayed and the next animation steps continue.
Pressing B replaces the animation by just displaying a letter and at that point display.clear()
works as expected.
from microbit import *
display.show("hello", loop=True, wait=False)
while True:
sleep(100)
if button_a.is_pressed():
display.clear()
if button_b.is_pressed():
display.show("X")
In V1 display.clear()
does stop the animation.
Metadata
Metadata
Assignees
Labels
No labels