Tag: #micro_mag

#MonthOfMaking Day 8

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(“99999:90009:90009:90009:99999”) scissors=Image(“99009:99090:00900:99090:99009”) rock=Image(“00000:09990:09990:09990:00000”) while True: if accelerometer.is_gesture(‘shake’) hand = random.randint(1,3) if hand == 1: display.show(paper) elif…

micromag

March 8, 2019

#MonthOfMaking Day 7

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 MakeCode Code Demo...

micromag

March 7, 2019

#MonthOfMaking Day 6

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 MakeCode Code Demo Final Words Come back Tomorrow for another fun…

micromag

March 6, 2019

#MonthOfMaking Day5

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….

micromag

March 5, 2019

#MonthOfMaking Day 4

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…

micromag

March 4, 2019