Feat: ajoute des exercices pour microbit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from microbit import *
|
||||
import time
|
||||
|
||||
for i in range(5):
|
||||
led.plot(i, 0)
|
||||
time.sleep(0.5)
|
||||
@@ -0,0 +1,14 @@
|
||||
from microbit import *
|
||||
import time
|
||||
|
||||
images = [
|
||||
Image.HEART,
|
||||
Image.HEART_SMALL,
|
||||
Image.HAPPY,
|
||||
Image.SAD,
|
||||
Image.CONFUSED
|
||||
]
|
||||
|
||||
for img in images:
|
||||
display.show(img)
|
||||
time.sleep(1)
|
||||
@@ -0,0 +1,14 @@
|
||||
from microbit import *
|
||||
import time
|
||||
|
||||
while True:
|
||||
if button_a.is_pressed():
|
||||
display.show(Image.HAPPY)
|
||||
time.sleep(1)
|
||||
display.clear()
|
||||
elif button_b.is_pressed():
|
||||
display.show(Image.SAD)
|
||||
time.sleep(1)
|
||||
display.clear()
|
||||
else:
|
||||
display.show(Image.HEART)
|
||||
Reference in New Issue
Block a user