Feat: ajoute des exercices pour microbit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-09-15 11:00:20 +02:00
parent 930ffc95c8
commit f8337b40ab
6 changed files with 79 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
from microbit import *
import time
for i in range(5):
led.plot(i, 0)
time.sleep(0.5)

View File

@@ -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)

View File

@@ -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)