Month of Making

This entry is part 1 of 13 in the series Month of Making

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.

Day01 – Hello World and More

In tradition, I decided to create a Hello World program. When learning a new programming language this will typically be the first program you learn to create, but this literally takes about a minute with a micro:bit. So I have decided to integrate the buttons and display some images too.

Python Code

from microbit import *
display.show(Image.HAPPY)
while True:
if button_a.is_pressed():
display.scroll("Hello World")
elif button_b.is_pressed():
display.show(Image.HEART)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

That is it for Today, check back Tomorrow to see what I do for Day2.

#MonthOfMaking Day 2

This entry is part 2 of 13 in the series Month of Making

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.

Day02 – Random Number Generator

Today I decided to make a random number generator.

The random number generator will generate a number between 1 and 5 and dsiplay it on the micro:bit. Lets get coding!

Python Code

shake = None
from microbit import *
import random
display.scroll("Shake Me")
while True:
if accelerometer.was_gesture('shake'):
shake = random.randint(1, 5)
if shake == 1:
display.show(1)
if shake == 2:
display.show(2)
if shake == 3:
display.show(3)
if shake == 4:
display.show(4)
if shake == 5:
display.show(5)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode code

Demo

Final Words

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

#MonthOfMaking Day 3

This entry is part 3 of 13 in the series Month of Making

March is all about MAKING!!

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

Day03 – Count Down Timer

Today I have decided to make a countdown timer.

The timer will count up to 20 when button A is pressed and the timer will start counting down from what ever number you chose between 1 and 20 when button B is pressed. Lets get coding!

Python Code

seconds = None
from microbit import *
seconds = 0
while True:
if button_a.is_pressed:
if seconds < 20:
            seconds += 1
            display.scroll(seconds)
        if button_b.is_pressed:
            for i in range (seconds):
                display.scroll(seconds)
                sleep(1000)
                seconds -= 1
            display.show(Image.NO)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 4

This entry is part 4 of 13 in the series Month of Making

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.

Day04 – Step Counter

Today I have decided to make a step counter.

Everytime the micro:bit is shaken it increases the number of steps by 1. Lets get coding!

Python Code

steps = None
from microbit import *
steps = 0
while True:
display.scroll(steps)
sleep(50)
if accelerometer. is_gesture('shake')
steps += 1

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 5

This entry is part 5 of 13 in the series Month of Making

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.

Day05 – Simple Dice

Today I have decided to make a Dice.

This is a great little project if you want to play a board game, but the dice seems to have been misplaced. Let’s get coding!

Python Code

from microbit import *
import random
while True:
dice = random.randint(1,6)
if accelerometer. is_gesture('shake'):
display.show(dice)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 6

This entry is part 6 of 13 in the series Month of Making

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.

Day06 – Coin Flip

Today I have decided to make a Coin Flip program. Great for decision making! Let’s get coding!

Python Code


from microbit import *
import random
while True:
    if button_a.is_pressed():
        if random.choice([True, False]):
            display.show(Image.HAPPY)
        else:
            display.show(Image.SAD)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 7

This entry is part 7 of 13 in the series Month of Making

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.

Day07 – Spirit Level

Today I have decided to make a Spirit Level program. Great for checking that surfaces are level! Let’s get coding!

Python Code

from microbit import *
while True:
    reading = accelerometer.get_x()
    if reading > 20:
        display.show("R")
    elif reading < -20:
        display.show("L")
    else:
        display.show("-")

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 8

This entry is part 8 of 13 in the series Month of Making

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.

Day08 – Rock Paper Scissors

Today I have decided to make a Rock Paper Scissors Game. Let’s have a bit of fun for a Friday Let’s get coding!

Python Code

from microbit import *
import random
paper=Image(&quot;99999:90009:90009:90009:99999&quot;)
scissors=Image(&quot;99009:99090:00900:99090:99009&quot;)
rock=Image(&quot;00000:09990:09990:09990:00000&quot;)
while True:
    if accelerometer.is_gesture('shake')
        hand = random.randint(1,3)
        if hand == 1:
            display.show(paper)
        elif hand == 2:
            display.show(rock)
        else:
            display.show(scissors)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

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

#MonthOfMaking Day 9

This entry is part 9 of 13 in the series Month of Making

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

#MonthOfMaking Day 10

This entry is part 10 of 13 in the series Month of Making

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.

Day10 – Temperature Sensing

Today I am going to use the built-in temperature sensor on the micro:bit to get the current temperature of the room I am in. Let’s get coding!

Python Code

from microbit import *
while True:
    if accelerometer.is_gesture('shake'):
        temp = temperature()
        display.scroll(temp)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode code

Demo

Final Words

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