From 6957c25265776fdb6808ff0b571296bc0e493db6 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 21 Mar 2021 07:36:34 +0100 Subject: [PATCH] Add kitronic 1 --- kitronic_01.py | 18 ++++++++++++++++++ template.py | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 kitronic_01.py create mode 100644 template.py diff --git a/kitronic_01.py b/kitronic_01.py new file mode 100644 index 0000000..b485832 --- /dev/null +++ b/kitronic_01.py @@ -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() diff --git a/template.py b/template.py new file mode 100644 index 0000000..3af66d8 --- /dev/null +++ b/template.py @@ -0,0 +1,9 @@ +from microbit import * + + +def main(): + pass + + +if __name__ == "__main__": + main()