#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 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

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.

Introducing Monday Makes

This entry is part 1 of 1 in the series Monday Makes

This is going to be a new blog post series of things I have been playing with. This can range from playing with micro:bits, Raspberry Pis or Adafruit Circuit Playground Express. There may even be some Arduino thrown into the mix too.

The plan is to have a different project up every Monday (Time permitting) Look out for the first post within this series next Monday.

Here is a sneak peek:

dav
preview:

Installing Mu on Linux

Mu is a simple code editor developed in Python for Python. Mu has built-in support for Adafruit Circuit Playground Express and the micro:bit. Mu runs on Windows, Mac, Linux and even the Raspberry Pi.

Each Linux distro is a bit different, so for this guide, I am going to focus on Ubuntu.

Mu requires Python3. You can check and see if you have Python3 installed by typing:

python3 --version

If nothing is displayed type:

sudo apt install python3

to install Python3.

You also need pip3 installed type:

pip3 --version

If it shows nothing you need to install pip3 by typing:

sudo apt install python3-pip

Finally to install Mu type:

pip3 install mu_editor

You can now run Mu from the command line by typing:

Mu

Now that you have Mu installed you can go and develop in Python3, Micro Python for micro:bit or even CircuitPython for the adafruit Circuit Playground Express.

On The Road To MozFest 2017 pt 2

This entry is part 2 of 4 in the series On The Road To MozFest 2017

Week 2: 08.10.17 – 14.10.17

Well within the last week I have finished the first draft of the worksheet and sent it off to wranglers to be checked over and see what they think.

I have also started my presentation for MozFest which explains what the electronic components are and how we are going to use them within the session.

We are now going into the final 2 weeks before MozFest so lots of deadlines coming up. I need to have the worksheet approved and completed for Friday the 20th, so they can go and get printed in time for the festival. There is a video call for facilitators on the 22nd.

That is all for this week Come back next week for the next update.

Introducing EduBlocks

He has opened EduBlocks up to the Raspberry Pi community, so he gets lots of feedback on how he can improve things, as well as other developers helping him convert python libraries into EduBlocks code. As well as people like me who have started using it for education and writing tutorials for EduBlocks.

So, EduBlocks is a block based program written in blockly for the Raspberry Pi. EduBlocks is real python code in block format like Scratch, making the transition from Scratch to Python easier.

I jumped on the bandwagon last year when I seen EduBlocks getting used in a tutorial session at MozFest within the youth zone ran by @all_about_code and thought this is something I can use. So after speaking to @all_about_code at MozFest and finding out what his plans were I told him to let me know if there is any way I can help.

So far I have contributed by trying to get more people using it by running sessions @DundeeRjam and about to run some at a local code club as well. I am also running a Session at MozFest this year using EduBlocks. (more to come on that later)

Go and checkout the getting started tutorial that is up at the minute, there will be LED tutorials getting added within the next week.

Thanks for reading and remember Keep having FUN while LEARNING!