Add kitronic 1
This commit is contained in:
parent
3541e2f172
commit
6957c25265
2 changed files with 27 additions and 0 deletions
18
kitronic_01.py
Normal file
18
kitronic_01.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
from microbit import *
|
||||||
|
|
||||||
|
sun = Image("90909:09990:99999:09990:90909")
|
||||||
|
moon = Image("59000:05990:00999:05990:49000")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
while True:
|
||||||
|
if button_a.is_pressed():
|
||||||
|
display.show(sun)
|
||||||
|
elif button_b.is_pressed():
|
||||||
|
display.show(moon)
|
||||||
|
else:
|
||||||
|
display.clear()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
9
template.py
Normal file
9
template.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
from microbit import *
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in a new issue