#MonthofMaking Day 9

#MonthofMaking Day 9

micromag

March 9, 2019

March is all about MAKING!!

I have decided to take on the challenge of making a 5-minute micro:bit make every day throughout March.

Day09 – Fill The Screen

Today I have decided to use the built-in compass to turn the lights on the LED screen on by tilting the micro:bit. Let’s get coding!

Python Code

from microbit import *
compass.callibrate()
while True:
    needle = ((15 - compass.heading()) // 30) % 12
    display.show(Image.ALL_CLOCKS[needle])

EduBlocks Code

EduBlocks code

Demo

Final Words

Come back Tomorrow for another fun 5-minute micro:bit make

Loading cart ⌛️ ...