Skip to content

Commit e40e382

Browse files
authored
Merge pull request #1 from GarethEdgell/main
ASP_MicroPython for micro:bit updates
2 parents 6b0855a + 6925fea commit e40e382

File tree

145 files changed

+2789
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+2789
-0
lines changed

1_zoo.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add your Python code here. E.g.
2+
from microbit import *
3+
import time
4+
5+
while True:
6+
if pin0.is_touched():
7+
display.show(Image.DUCK)
8+
sleep(10)
9+
elif pin1.is_touched():
10+
display.show(Image.COW)
11+
sleep(10)
12+
elif pin2.is_touched():
13+
display.show(Image.BUTTERFLY)
14+
sleep(10)
15+
else:
16+
display.show(Image.SKULL)
17+
sleep(1)

2_microbit_piano.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add your Python code here. E.g.
2+
from microbit import *
3+
import time
4+
import music
5+
6+
while True:
7+
if pin0.is_touched():
8+
tune = ["A2:4"]
9+
music.play(tune)
10+
sleep(4)
11+
elif pin1.is_touched():
12+
tune = ["B2:4"]
13+
music.play(tune)
14+
sleep(4)
15+
elif pin2.is_touched():
16+
tune = ["C2:4"]
17+
music.play(tune)
18+
sleep(4)
19+
else:
20+
display.show(Image.SKULL)
21+
sleep(1)

Healthy Eating (1 to 6)/Micropython for microbit_L1_updated/Baseline test answers.rtf

Lines changed: 990 additions & 0 deletions
Large diffs are not rendered by default.

Healthy Eating (1 to 6)/Micropython for microbit_L1_updated/Baseline test.rtf

Lines changed: 968 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Add your Python code here. E.g.
2+
from microbit import *
3+
4+
5+
while True:
6+
display.scroll('Hello, World!')
7+
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)