adaped from
====
from microbit import *
while True:
gesture = accelerometer.current_gesture()
if gesture == "face up":
display.show(Image.HAPPY)
else:
display.show(Image.ANGRY)
============
from microbit import *
import random
answers = [
"a",
"b",
"c",
"e",
"f",
"g",
"h"
]
while True:
display.show("8")
if accelerometer.was_gesture("shake"):
display.clear()
sleep(1000)
display.scroll(random.choice(answers))
========display.show()
from microbit import *
while True:
for i in range(0,12):
display.show(Image.ALL_CLOCKS[i])
sleep(500)
==============
沒有留言:
張貼留言