Micro:bit Projects and Updates - Issue 3
Micro:bit Projects and Updates - Issue 3
Issue 3 [Link]
January 2019 @micro_mag
AMAZING
Projects
We showcase some of our most
loved micro:bit projects
Contact us:
Archie Roques makes lots of different things, from
circuit boards to tables. Some of them even work! Website: [Link]
Email: hello@[Link]
James Bastone runs a local Makerspace and joined the
team because he genuinely enjoys proofreading articles. Twitter: @micro_mag
4
Issue 3: Contents
Cover Feature:
10 Amazing Python Editor
Projects BETA
Page 22 Page 36
Win a
Make your own
add-on
Page 52 Page 6
:news
EduBlocks BETA Winners & Scratch Conf
7 Try out the new EduBlocks! 8 Global Challenge winners are here!
Cover Feature
10 Amazing Projects intro Projects 1-3
22 Welcome to our cover feature 23 Cubert, rocket cars & Invader game
4 Projects 4-6 Projects 7-10
26 Mega:bit, VR & hovercraft 29 Display, Bike sim, Guitar & Pong
:feature
Scratch to micro:bit Python editor Beta
33 Link your micro:bit to Scratch 2 36 What’s new in the BETA of the editor?
:make
A little light music Eddystone beacons
45 Make music with micro:bit 48 Use micro:bit to update a URL
Speech recognition
69 Use a microphone with micro:bit
More Articles
Create a flood detector Meet the Foundation
74 Micro:hit returns for Issue 3! 77 Technical Team
:review
Pimoroni touch:bit Pimoroni automation:bit
79 Six handy touch sensitive buttons 82 Control up to 24v with micro:bit
How to win
We’ve got 2 boards up for grabs with 2 categories (UK Only):
Rules + T&C’s
As with any competition, it is
important to read the Rules +
T&C’s which can be found here:
[Link]/comp-rules
7
:news EduBlocks BETA
EduBlocks micro:bit
A refresh of the EduBlocks for
BETA
The popular tool that
helps people make
gives people the
micro:bit editor is here in BETA
for you to try!
chance to update their
the transition from resources if they need
block based to do so. The main
programming to update in this new
Python has just version is the switch to
announced that an the Scratch 3 block
updated version is style which we is in
now available in the brand new
BETA for people to MakeCode update that
try out before it goes has just gone live. Try
fully live. This also it out today!
[Link]
8
:news Global Challenge + Scratch Conf
Global Challenge
Winners!
If you cast your mind
back to Issue 2, we
challenge. With
winners from Europe,
advertised the Asia, Africa, North
micro:bit Global America, Middle East &
Challenge. After Latin America, there
hundreds of entries are a whole host of
and rigorous judging, amazing projects that
the Micro:bit contribute towards the
Educational Global Goals and all of
Foundation have them are definitely
announced the worthy winners. Check
winners of the out the winners at the
link. [Link]/gcwin
UK Scratch Conf
2019!
Whilst not direct
The Raspberry Pi foundation have
announced a UK Scratch Conference!
not released tickets yet
micro;bit news, we for this event,
thought this was however, a call for
worth a share. The “content creators” has
Raspberry Pi been launched. So, if
foundation have you’d like to do a talk,
announced that the run a workshop, show
Scratch Conference off a project or hold a
is coming to the UK discussion session to
for the first time! The do with Scratch you
event will be held at can do so now. We
Churchill college in would love to see lots
Cambridge on the of Scratch powered [Link]/webusb
23rd-25th August
2019. They have
micro:bit projects here
too! Learn more using
[Link]/s-conf
the link.
9
Work at micro:bit + Scratch 3.0 :news
[Link]/workatmb
Bitty Software
Create the most inclusive and immersive STEM
lessons for the whole class with BittyWeb
The Bitty Software mobile applications for the
micro:bit have proved popular with teachers and
STEM ambassadors, allowing invisible physical
phenomena to be visualised and analysed using
Bitty Data Logger, robots to be programmed and
remote controlled using Bitty Controller and
coding exercises to be undertaken. The nature of
mobile applications and the policy many schools
have on the use of smartphones in class has
meant that these applications were only really
available to the adults in the room, typically
teachers. That has all changed with the
introduction of BittyWeb.
Bitty Polyhedra
We’ve tried to make the getting-started and drop with their finger, and more
efficient use of block space.
experience more intuitive by creating a set of
step-by-step tutorials and making the example
projects more discoverable. We moved all the
content that was in the Projects menu before
into this new homepage experience.
● Different shapes for different data functionality with more intuitive plus (+) or
types – specifically boolean values minus (-) icons on the blocks to add or delete
(true/false) are hexagon shapes, and clauses.
numbers and text are round
Make a Variable
Cogwheel RIP
We got out the shovels, said a few words, and Based on feedback, we tried to make the process
then had a little party when the cogwheel died. of creating variables clearer. Now, you will
Most likely you used the cogwheel in your If explicitly click on the “Make A Variable” button in
Then Else blocks to add additional clauses. It the Toolbox to name and create a new variable
was an awkward interface that most people and the associated variable blocks.
Radio blocks
We made some slight changes to the Radio API’s
to make them simpler. Most people won’t
notice, but if you are an advanced Radio user,
you may see that we’ve reorganized the way we
receive radio packets – same functionality is
there, but made more explicit through
single-use blocks.
Floating point
This is probably the biggest change we’ve made
for this update. All you Math Teachers out
there, prepare to rejoice… we now support
floating-point arithmetic! This was a big
request – as many of you know, we only had
support for integers before. But now 3 ÷ 2 really
equals 1.5 (instead of 1)!
[Link]/donate
Activity Centre
Using micro:bit &
pi-tops
The Raspberry Pi Foundation partnered up with
Scouts to create a Digital Maker Badge. I was
lucky enough to go and help one of the leaders
run part of the event.
found Michael, who showed me around the Scouts moved on to a project called ‘Rate your
different rooms and also the main hall where mates’, which can be found here. Others
people had brought various technology along to experimented further with their interactive
The afternoon
Then in the afternoon, we had some Beavers and
Cubs come in too. They needed more help to get
going with the micro:bits as they were younger.
For the majority it was their first time coding –
some had not even heard of coding before! For
Rate your Mates pdf from [Link]
these children I found out if there was anyone
who knew a little about it sat next
18
:news Finding a:fit for micro:bit
Rebecca Keough
Finding a:fit Rebecca Keough ([Link]/T & MEd
G&T) is a Classroom Teacher
and Coordinator in NSW
Australia. Passionate about
However, the expectations on Australian Through working with the ACARA DTiF (Digital
Teachers to now teach the new Digital Technologies in Focus) Project in conjunction
Curriculum as at 2019 has a lot of educators with Project Curriculum Officer Kim Vernon, the
feeling very uneasy and some feeling conflicted staff at St Mary’s Primary School in Moruya have
as they face a future of working alongside their forged ahead to challenge these ideas and begin
students and moving away from practices where to explore the multiplicity of ways that the
the teacher is the expert. micro:bit and computer programming (both
micro:bit. Whilst younger students spent time we as expert educators emulate this kind of
exploring interactive robots to explore coding learning in our classroom? Our university
through a different lense. Students were highly degrees do not qualify us, nor do they equip us
engaged and the teachers were very impressed with the skills to teach these new requirements.
20
Finding a:fit for micro:bit :news
Daunting indeed. An interest to learn more ….. check. So now
what?
Breaking open discussion between staff,
facilitator and mentor through bringing in The next part of this journey will involve
lessons that had already been planned to engage working with staff to provide short sharp
teachers in discussions around embedding workshops where they can use the micro:bits in
rather than reinventing was key. This was well an authentic and integrated manner to give
received and it has certainly provided students the programming skills required,
provocation for staff to begin thinking about whilst walking alongside the staff in the
‘what next?’ as we began to think about the new classroom to deliver the kind of lessons they
digital curriculum in a new light. want their students to experience.
micro:bit we are finding the fit!
We often allow students time to engage in
pre-learning activities such as sand pitting or
tinkering, whereby they are able to look,
explore, discuss and discover through play. Why
can we not facilitate this for staff? Enter the
‘Teacher Tinker Table’.
[Link]/contribute
Engaging teachers in exploring micro:bits was
rewarding and challenging.
Get in touch!
[Link]/contribute
hello@[Link]
@micro_mag
22
AMAZING
Projects
This issue, we wanted to showcase some of our favourite micro:bit
projects we have recently seen doing the rounds on Twitter and in the
community. The amazing projects our community gets up to is really what
makes the micro:bit amazing and unlike any other microcontroller out
there.
Whether it be in Schools, at home or at a club, the micro:bit is powering
tons of cool projects like LED cubes, there is no shortage of cool projects
with the micro:bit. So, without further ado, in no particular order, let’s get
into some of our favourite micro:bit projects!
23
Cubert
Made by:
Lorraine
Underwood
What is it?
Cubert is an amazing 8x8x8 3D
LED cube built by maker
extraordinaire Lorraine
Underwood. This dazzling
project features 512 LEDs
soldered onto a custom PCB that
are encased inside a ping pong
Cubert in action! Photo: Paul Beech ball. Each LED is fully
programmable and addressable,
so you can give it an RGB value
and have each LED turn a
custom colour of your choice.
Cool, eh? Lorraine says: “It is a
How does it work? metre cubed in size. It breaks
down into individual columns
Cubert has 512 Neopixels which are tiny that can be transported in the
LEDs soldered onto a PCB. In cubert one, boot of my car.” You may have
Lorraine hand soldered these LEDs onto a seen Cubert at events like Maker
custom PCB, this was very temperamental Faire UK or Raspberry Fields last
and there were “lots of loose connections”. year. Cubert has been built twice
In Cubert 2.0, Maker company Pimoroni with Cubert 2.0 being the one
donated some redesigned PCBs in which that rectifies the lessons learnt
lorraine used Copper Rods to hold the cube from the first. Building Cubert
together and connect the PCBs. The cube is was a long and tedious project,
mainly controlled by MakeCode’s NeoPixel as you may have seen on
extension for the micro:bit, but can also be Twitter, where Lorraine posted
controlled via a Raspberry Pi or Arduino. regular updates on building
cubert at @LMcUnderwood.
What is it?
You may have heard of the
Bloodhound land speed record
attempt car, well in 2016,
Bloodhound Education and
partners brought a competition
to Secondary schools in which
they could build a model out of
Look at them go! Picture: Bloodhound Edu
polystyrene which was cut and
designed to how the participants
wanted and then raced.
Bloodhound say “Inspired by the
rules governing the World Land
How does it work? Speed Record attempt that the
1,000 mph BLOODHOUND
Students get given a polystyrene block that Supersonic Car is targeting, the
they can model into a design and shape of model rocket cars must blast
their choice. A hole in the centre of the car along a wire and through a set of
is cut out to hold a micro:bit in a custom timing gates with a BBC
built case. On this micro:bit is the Bitty Data micro:bit on board gathering
Logger hex file (learn more about Bitty vital data that enables the Teams
software on page 10) which will connect to to modify and improve their
a phone via bluetooth. This tracks the designs.” Another cool thing
accelerometer data from the micro:bit and about this project is others got
displays it on the phone via a handy little creative with testing out their
graph. We think this is a great project to get projects, by building timing
kids involved with the micro:bit and STEM. gates using a micro:bit, serial
data and infrared sensors, like
this project by Les Pounder :
“micro:bit Infrared Timing
Find out more Gate”
Visit the Race for the Line project here:
[Link]/raceforline
25
micro:bit Invaders
Made by:
Stu
Lowe
What is it?
mega:bit
Made by:
Andrew
Gale
What is it?
The Mega:Bit is a scaled up
micro:bit, it features the 5 x 5
LED matrix and buttons, just like
the normal micro:bit. Best of all,
it is fully functional. The
mega:bit was developed for use
in the classroom as a prop to
The original mega:bit. Photo: Andrew Gale
show students how a micro:bit
works. It is all controlled by a
very complicated looking PCB
which has 25 big LEDs in which
are then encased by an acrylic
How does it work? micro:bit. However, the wiring is
quite complicated as not all the
The micro:bit is slotted into an edge LED signals are broken out on
connector which is connected to a PCB with the micro:bit’s edge connector,
wiring for the big LEDs and buttons. Some so this is something that would
of the LEDs from the micro:bit are directly be quite difficult to build at
read from the pins of the edge connector, home. Fear not though, Andrew
however, some of the LEDs are not broken is planning on taking the
out so you have to carefully solder wires mega:bit to market with an
directly onto the LEDs which is very fiddly. updated version that should be
At the end though, it all comes together as a easy for everyone to make
neat little package for a fully functioning themselves! The original plan
large micro:bit. for the mega:bit was for it to be
controlled by a Raspberry Pi as
the micro:bit was not available
when this project was made,
Find out more however, David Whale, who had
access to one at the time,
Andrew has written a post on his blog here:
stepped into help with making
[Link]/megabitpost
this fully micro:bit powered.
27
What is it?
micro:bit Hovercraft
Made by:
ElecFreaks
What is it?
What is it?
Imagine if you had a wall made
from micro:bits that you could
scroll your name on and make
large scale games. Well, the folks
over at Kitronik built a huge
The 1000 micro:bit display doing it’s thing. display of 1000 micro:bit’s all
Photo: Kitronik connected together to let you
play games and scroll text on
this huge display. Countless
hours and huge amounts of
effort went into this. It was
How does it work? originally built for the first
public showing of the micro:bit
back in 2016. The result is
The way it all works is that there is 1 master phenomenal, Kitronik often take
micro:bit that uses serial to talk to 8 other this to events like Makerfaire UK
micro:bits, each of these pass a message and BETT (the show it was
onto 5 individual micro:bits at the bottom originally made for). When at
of the display and these are relayed up the these events, it runs a number of
display in columns and gives an amazing different demos from Space
result of a display made from 100 invaders to just scrolling text.
micro:bit’s on which you can play games, This project is the work of many
display images and scroll text. volunteers linked to the original
BBC micro:bit project and it took
a few months of testing and
numerous smaller prototypes,
but this display is always a huge
Find out more hit at events we have been to
and seen it at.
Kitronik wrote a post about the process here:
[Link]/1000mb
30
MicroBike
Made by:
Musab
Kılıç
What is it?
What is it?
The micro:bit MIDI guitar is a
musical instrument. You can
Pictures
play music on it just like a real
of the
guitar. It is made from two
guitar and
pieces of wood left over from a
it’s wiring.
wardrobe and is decorated with
a number of strips of copper
Credit:
tape (slug barrier tape), uses two
David
Kitronik breakout boards, and
Whale
two micro:bits. It simulates a
single string on a guitar, which
is enough for most pop songs!
But, it does not generate any
How does it work? sound itself! Instead, it connects
to a computer via a USB
One micro:bit senses the left hand frets,
connection used as a MIDI
and the other senses the right hand touch
(Musical Instrument Digital
pads and also sends MIDI messages to the
Interface) instrument, and can
computer. Touch inputs on the micro:bit
be used with any music
are resistive touch, so you have to hold the
production software (David used
GND connection to complete the circuit. On
Garage Band, which is
the back of the wood is a long strip of
pre-installed on Apple Mac). So,
copper tape connected to the GND pin on
it is really just an input device.
the micro:bit, and putting your thumb here
In the future, David wants to
naturally completes the circuit.
add more left hand pads (giving
a wider note range), add a
'palm mute' pad to improve
playing style and add a
moveable capo mode.
Find out more
Visit the GitHub repository:
[Link]/midiguitar
32
micro:bit TV-Pong
Made by:
Nigel
Kendrick
What is it?
Play the classic Pong game on a
TV (composite video) - using BBC
micro:bits as paddles! Using a
Grant Searle’s pong game for
the Arduino, Nigel has hacked
Cubert in action! Photo: Helene Virolan the existing code to use 2
micro:bit’s as up and down
paddles for the game. The aim of
this project is for use in STEM
coding workshops using
micro:bit’s as the game paddles.
How does it work? The micro:bit’s are wired to the
Arduino (a custom one built on
The project consists of a custom arduino some stripboard). Nigel used the
with an ATMEGA328. This has a composite micro:bit’s edge connector to do
video out cable that plugs into a PC. 2 this. The micro:bit’s can send a
micro:bit’s are used as paddles and these few different commands to
are connected via the edge connector to the control the Pong game like, Left
arduino via cables, you can also use it player down/up, Right Player
wireless though if you wanted. In the up/down. Nigel has also
GitHub repository, the 'paddle' files use the produced a few different
A and B buttons on the micro:bit as digital version of this project, for
paddle controls. The code is written in example, you can use the
MakeCode so will be easy to adapt. Paddles remotely using the
Radio feature on the micro:bit or
you can use the Bitty controller
software via bluetooth too.
Find out more
Visit the GitHub repository here:
[Link]/tvpong
33
Alan Yorinks
:feature Outside of the office Alan likes to
read mystery novels, go to the
gym, and volunteer as a literacy
tutor for adults. On a warm
sunny day, you might find him
in the rough, foraging for a little
@BrassFigLigee white ball that refuses to stay on
[Link]/MrYsLab the fairway.
s2m - The
Scratch/
micro:bit
Bridge
The Why, What and How of s2m.
In a time, long, long ago, - well not all that long program that would allow Scratch to control a
ago – 2013 to be exact, I had discovered the micro:bit, similar to some of the work I have
Scratch programming language. Roughly at the done for Arduino and Raspberry Pi
same time, I discovered the world of microcontrollers.
microcontrollers. “Hmm”, I thought, “wouldn’t
it be great if I could use Scratch to program and Not knowing much about the micro:bit, I
control the microcontroller”? Little did I know purchased one to see what all the fuss was about.
that this innocent pondering would eventually I could not believe what an amazing little
lead to the development of s2m, the Scratch to microcontroller it turned out to be! It is packed
this article, full installation instructions can be sure that it would be compatible with Windows,
Thanks to the generosity of the s2m user Once Scratch appears on your screen, you create
community, s2m comes with blocks translated an s2m project just like you would any other
to: Scratch project, except you will find the s2m
● Brazilian-Portuguese blocks under the More Blocks section of Scratch.
● Hebrew
● Japanese Here is a screenshot of a demonstration
● Korean program, provided by Edson Sidnei Sobreira,
35 15
:feature Micro Simon Bridge :feature
The Scratch/micro:bit
that is included in the s2m distribution. By myself.
tilting your micro:bit, it allows you to move and
interact with a Scratch sprite. Want More Information?
An online User’s Guide is available that explains
how to install and use s2m. You can find the
guide at [Link]
Questions or Comments?
A demonstration program included with s2m, that controls the
motion of a Scratch sprite by tilting a micro:bit.
Questions and comments are always welcome.
You can find my contact information on my
The How
Github page shown at the top of this article.
@carlosperate
status, and at the moment only Chrome has [Link] Your help and
implemented the API. To use WebUSB with the feedback are invaluable, and you can help shape
Troubleshooting
REPL view on the online beta Python Editor.
Keep in mind that as beta software, there are
still a few rough edges that need to be polished
Not only that, but the REPL offers
before it is ready for a public release, and it is
autocompletion. Start typing a variable,
quite possible some things might not work
function, module or method, and press the “TAB”
exactly as expected. The following support
key to see all the available options.
article contains a list of known issues with
MicroPython v1.0
At the moment the version of MicroPython WebUSB and workarounds or fixes, so if
included in the beta editor is the same as the one something doesn’t work quite right, check that
included in the normal editor. However, new article first. If your issue is not already there,
beta versions of MicroPython are coming and please open a new ticket in the support website.
they will be added to the beta editor first, so keep We will love to you help you and it will also help
an eye for interesting new features in this area anybody else going through the same problems.
To sign up, go to
[Link]/email
41
Diego Fonstad
:feature Diego Fonstad is the co-founder of
Imagination Supply Co. a Benefit
Corp whose mission is to
@lectrifyit
Buttons Input The micro:bit has two need to be static. By creating sequences of lights
buttons for input students can animate the face.
Light Sensor Input The 5X5 LED matrix The bit:booster adds a piezo tone generator to
can be used to the micro:bit and the bit:booster uses the same
measure the light
level ( default P0 for the piezo. Students can explore
how different sounds can be used to generate
Accelerometer/ Input The micro:bit has can
moods and give their ePet personality.
gyro/ Compass measure acceleration,
pitch, roll and
compass direction. CARE AND FEEDING OF THE ELECTRONIC PET
THROUGH THE INPUTS
The accelerometer provides many opportunities
Temperature Input The micro:bit can for interacting with the virtual pet allowing for
Sensor measure temperature different reactions whether mildly shake or
in celsius
dropped suddenly.
Building upon the above list, students
brainstorm how to apply the inputs and outputs The light sensor can be used to explore how the
to their own electronic pet (ePet) program. pet responds to the dark and may be used as a
way of letting it “sleep”
OUTPUTS GIVE THE ELECTRONIC PET
PERSONALITY The buttons can be used to emulate concepts like
The LEDs and NeoPixels are quickly identified as feeding and bathing like a Tamagotchi pet.
a possible face. Students next need to decide the
direction of their ePet. If the ePet is upright, the The power of the ePet project is how open-ended
NeoPixels can be eyes and the 5X5 LED matrix it is and can be driven by the students. It can
can be the mouth. Upside down, the 5X5 matrix also be build upon incrementally. Students can
becomes an eye and the NeoPixels become the start with simple ePets of only a face responding
mouth. You’ll be surprised how expressive and to simple inputs. As they evolve their pets, they
creative children can be with the LED & NeoPixel can evolve their coding to more complex
palette. concepts such as storing variables to track how
many times the pet is “fed.”
The micro:bit LED matrix is controlled using the
standard MakeCode blocks and the NeoPixels are
43
Designing an Electronic Pet :feature
Here's a video of a relatively
advanced-coded pet using only the bit:booster
and micro:bit [Link]
Here's the sample code in
MakeCode [Link]
3jCgaE6F0
Donate on
:
[Link]/donate
45
David Perks
:make
David is an artist maker who
has added electronic junk
and microprocessors to his
palette.
@pdbperks
[Link]
What can you achieve with the smallest number of code blocks?
Finally, wrap the wire around the tip of the headphone plug.
Wrap the other end of the wire around the tip of Placeholder
the headphone plug: the tip has a notch that
makes this task easy.
Action:
Power up the micro:bit and expose it to light to
generate sound. The stronger the light, the
higher the pitch. Use your hand over the LEDs
to play the instrument. Torches with strobe
effects are great fun. If you want louder noise
then you can use the same method to connect
the micro:bit to an amplifier using a suitable
phono cable.
@pradeeka7
3. In the modal box (window), click on the Notification on BeaconSage app with updated URL.
Destination URL.
7. With the Rebrandly Dashboard, you can
update the Destination URL unlimited
number of times.
Do It Yourself
Update the destination URL with the third URL
Editing the Destination URL – Step 1.
from the above URL list (Step 1).
4. In the Destination URL box, paste the new
URL. Then click on the Save button.
boards I have successfully made with Year 5’s in Glue the left third of the card as in the diagram,
my code club, and examples of what you can do and smooth the foil down on it. Bend the foil
with them. I have assumed you have micro:bits around the back of the card and glue that down
and crocodile clips. too.
Traffic Lights
Take some more of foil and glue three patches
around the right-hand third of the card. Make
sure they don’t touch. Make sure they go round
the back too.
53 53
:make Make
Make your own your own
add-on add-on:make
boards boards
[Link]
[Link]
Introducing Mr. Boppy. High five him, then he will open his candy vault! See him alive: [Link]
interface in your project. In this tutorial, you will observe in our daily lives and tried to recreate
also learn how to get started with a micro servo those gestures with a micro:bit. The high five
create a micro:bit-powered robot that invites against another person’s hand to make an
physical interaction. The micro:bits sensors impact before snapping it back again. I designed
allow it to detect different forms of inputs from the arm in such a way that a micro:bit can
its surroundings, such as shaking, tilting, button interpret the impact from the high five as a
pressing, and changes in light. So how could I shake. Think of it as a vertical seesaw: the higher
use these sensors to allow for unique human part of the arm above the pivot point is where
interaction? I found the answer by focusing on you high five and the part below is to where I
the project’s physical interface design. attached the micro:bit. When a high five
happens, the bottom part of the arm will make
For example, if you wanted the physical short swings back and forth and shake the
Mr. Boppy has two parts: The body part with his arm and head and Divided by the pivot point, the top part of the arm is where you
the candy vault with a lid that opens and closes. high five and the bottom part is where the micro:bit is attached.
56
:make A High Five for Mr Boppy!
This is the code that makes the lid of the compartment open and
close when the micro:bit is shaken.
[Link]("hello")
The transducer is then connected to the micro:bit
hitSenseLevel = 100
using the following schematic.
while True:
hitSense = pin0.read_analog()
print(hitSense)
sleep(80)
if hitSense > hitSenseLevel:
[Link]([Link])
sleep(1000)
else:
[Link]([Link])
Beat-Reactive [Link]
able to use two per drummer, one attached to the could make the skin of another vibrate, even if it
back of the drum with duct tape and one in a was at the other end of the room.
pouch attached to the backpack to control the
lights. We used micro:bit radio (Bluetooth) to Separately, we worked with Uma and Mandy
communicate between the two, with each pair of from Brouhaha on the carnival backpacks. Ilsa
micro:bits being assigned a separate channel. The had come up with an idea to have a flat disk
drummers move around a lot when they’re behind each drummer’s head, with the LEDs
performing, so it was good not to have wires forming a spiral on the disk. The backpacks are
between the drum and backpack. made from light aluminium tubing and
normally decorated with lightweight elements
like sequins and feathers. Although the LEDs
weren’t heavy, Mandy had to find a thicker than
usual fabric for the disks to make sure that they
didn’t rip out of the fabric – it also needed to be
reflective to make the most of the light. She had
to source pouches that could be attached to the
back of the backpacks to carry the micro:bits
and batteries too – she ended up using insulated
lunch bags!
Mandy sewing LED strip onto one of the disks. The disk consists
of a wire ring with reflective fabric hot-glued onto it. These were
then attached to the backpacks.
between the different drums – beating one drum the micro:bits, batteries and lights and were
44 62
:make Beat-Reactive
Formula :make
Drum Lights
One In Schools
able to draw on a team of volunteers at DoES them temporarily with crocodile clip test leads.
Liverpool to help us with the electronics,
including Mike, Adrian, Paula, Paul H, and Chris T. The band’s performance in front of a large
Then it was up to Mandy to sew on the LEDs and crowd outside the library was fantastic and the
decorate the backpacks. lights flashing in time to the rhythm of the
different drums really added to the effect.
Soon it was dress rehearsal night. We attached the
electronics to the newly decorated backpacks and
then attached the backpacks to the drummers! It
took some of them a bit of time to get used to
drumming while wearing a backpack. One thing
we hadn’t taken account of was that some of the
signals we were getting were caused by sound
reflecting off the walls of the practice hall. Zarino
ended up going along to one of Batala Mersey’s
micro:bits waiting to be attached to
outside performances and taking measurements drums at the dress rehearsal. They were
given names so that we could easily
to make sure that there wouldn’t be any issues.
match them up with the correct
backpacks.
communicator
Do things when events occur convert the incoming data back to a number.
The rest of the script is essentially saying "if if incoming:
something happens, do this" followed by [Link]([Link])
sleep(500)
displaying the select image and a delay. Without
[Link](images[int(incoming)])
the delay, the micro:bit was checking the buttons
sleep(2000)
too often, making it hard to read a single press. If
you find that you have to hold down the buttons Make sure that index_num stays within the key
too long, you can reduce the sleep() delay value to values for the images dictionary. In this case, if
make it a little quicker. If it flickers between index_num is too high, we set it back to the first
different images when you press buttons, image; and if it gets too low, we set it to the
sleep(500) [Link](images[int(incoming)])
sleep(2000)
The entire script
So, the whole script should look like (I've added # Keep the index_num within the valid dictionary
key range
comments, so don't worry about any lines starting
if index_num > 12:
with #: index_num = 1
# A micro:bit emoticon chat script elif index_num < 1:
# By @justaboutfine index_num = 12
from microbit import *
import radio # Show the current image
[Link](images[index_num])
# Create a dictonary of our emoticon images sleep(500)
images =
Now flash this to two or more micro:bits and
{1:[Link],2:Image.HEART_SMALL,3:[Link]
Y,4:[Link],5:[Link],6:[Link],7: you should be able to use the controls listed
[Link],8:[Link],9:[Link], above, to select and send emoticons from one
10:[Link],11:[Link],12:[Link]
micro:bit to another. On the Mu editor and
N}
index_num = 1 Chrome plugin, you can just click on 'flash', with
other editors you can compile your project to a
# Set the radio channel to 10
.hex file and drag or copy it to your micro:bit
[Link](channel=10)
[Link]() once it is plugged in. At the time of writing,
flashing via BLE doesn't work if you're using
while True:
Python. Also, using the radio in other languages
# Capture received radio data
incoming = [Link]() can interfere with BLE functionality. If you have
a group, you can send to more than one
if button_b.is_pressed():
micro:bit. You can set separate radio channels
index_num += 1
if button_a.is_pressed():
on different pairs of micro:bits to have separate
index_num -= 1 teams or emoticon conversations. From here,
you could even use this to send text messages to
# Send the current emoticon if both buttons pressed
one another as well, or use speech() to 'say' a
together
if button_a.is_pressed() and button_b.is_pressed(): message on another micro:bit equipped with a
[Link](str(index_num)) speaker. The possibilities are fairly broad, so go
[Link]('sending...')
and experiment!
66
:make Chris Penn
Chris is a teacher from
Warwickshire who teaches
Computer Science and IT. He
also runs the Coventry and
Warwickshire Raspberry Jam.
@ChrisPenn84
A scalable cube of TNT controlled by the micro:bit that you should see by pressing ‘b’ and using ‘s’ on the keyboard to walk back so
you can see the cube you have created.
def bigBlock(Increase,block):
pos = [Link]() 13. Once your code is working, here is the
[Link]("Build") process you will need to go through to get
[Link](pos.x, pos.y, pos.z,pos.x+Increase,
it working with the micro:bit:
pos.y+Increase, pos.z+Increase, block)
[Link]("Wait")
[Link](5) 14. Plug in your micro:bit.
[Link]("Clear")
[Link](pos.x, pos.y, pos.z,pos.x+Increase,
pos.y+Increase, pos.z+Increase, 0) 15. First of all, it will display this message:
No micro:bit has previously been detected
Scanning for serial ports remove the
Increase = 0
pos = [Link]() device, then press ENTER
while True:
Speech Recognition on a
micro:bit
Part 1 - The Challenge of Speech Recognition and
Building the Electronics
You Will Need: communicate with other people. We’ve not
- 1 x Adafruit ADA1713 Electret
Microphone Board spoken to them! Now that is changing. Early
- 1 x Schottky Diode – e.g. 1N5817 attempts at speech recognition included
- 1 x 47uF Aluminium Electrolytic
Capacitor telephone systems where you could ask for a
- 1 x 10k Resistor ticket to the cinema in Carlisle and it would
- 1 x Breakout & Prototyping Board – e.g.
respond by saying "Did you say Wolverhampton?"
zbit:breadboard
But more recently the technology has improved
For years we've communicated with computers to give us speech control of our mobile phones
by typing on a keyboard and clicking a mouse. with features such as “Siri” and digital assistants
Then we started communicating with them in that sit in the room with us that we talk to such as
other ways such as touching them, tilting them “Alexa”. And it could be that in the future
and shaking them. But until recently we’ve not speaking to computers becomes the main way we
communicated with them in the main way we
44 70
:make Speech
Formula In Schoolson:make
Recognition
One a micro:bit
communicate with them! So why has it taken so to be sampled, according to the 'Nyquist Rule*',
long for us to be able to speak to computers? The at twice the maximum frequency of the sound.
answer is that speech recognition is very difficult This would mean making over 20,000 samples a
for a computer! But why is speech recognition so second, or one sample every 50 microseconds!
difficult? What are the challenges that a speech Theses sample must then be processed in 'Real
recognition ‘algorithm’ must deal with? And, can Time*' by algorithms such as the 'Fast Fourier
we do speech recognition on a micro:bit? Transform*'. This normally requires specialist
'Digital Signal Processor*' chips which have
The micro:bit has limited processing power and
built-in hardware blocks such as 'Multiply
limited memory so doing “Alexa” levels of speech
Accumulate Units*' and 'Neural Networks*' to
recognition is not going to be possible! But just as
speed up the processing. “Alexa” may have such
the micro:bit’s limited display of just 25 LED’s
chips but the micro:bit does not! So, what can a
forces us to be creative as to how we display text
micro:bit capture? Let's see!
and images, by being equally creative there is a
way to do speech recognition on a micro:bit and [*An explanation of the meanings of 'Nyquist
this article shows you how! Rule', 'Real Time', 'Fast Fourier Transform',
'Digital Signal Processor', 'Multiply
The article is in two parts...
Accumulate Units' and 'Neural Networks*' is
Part 1 describes the Challenge of Speech
beyond the scope of this article, but look them
Recognition and shows you how to Build the
up on Wikipedia if you'd like to know more!]
Electronics and test it works as a micro:bit
Volume Meter! Elements of the Spoken Word
Spoken words contain 3 basic elements.
Part 2 describes the Challenges faced by Speech
Volume, Duration and Frequency Content.
Recognition Software and shows you how Code
you own Speech Recognition Algorithm in Volume is how loud each word sounds
MicroPython to turn your micro:bit Volume Duration is how long each word lasts
Meter into a micro:bit Speech Recognition Frequency Content is what combination
Device! of audio 'pitches' each word contains
The diagram below shows how to wire up the trough, the Schottky diode will be ‘reverse
microphone and other components using biased’ and since current can't flow back
zbit:breadboard. The Capacitor and the Schottky through a diode, the capacitor will maintain its
voltage. When there is silence however there
Diode must be
will be no output from the microphone to keep
plugged in
the capacitor charged so the capacitor will
orientated as
slowly discharge through the 10k resistor.
shown. The
Typically, it will take about 50 milliseconds to
Resistor can be
charge up the capacitor when you start
plugged in either
speaking into the microphone and about 150
way round. There
milliseconds for the capacitor to discharge
are no connections
when you stop speaking.
to the 'AR' and
'Gain' pins of the
Adafruit board.
44 72
:make Speech
Formula In Schoolson:make
Recognition
One a micro:bit
This results in the capacitor's voltage looking like To test your electronics, download the program
the Oscilloscope waveform below. [Link] from:-
[Link]/SpeechRecognition
connected to one of the analog GPIO pins on the LED's on the micro:bit's display from one LED
micro:bit (P0, P1 or P2). In Part 2 we will be using when there is silence, up to 15 LED's when you
P0 to output sound effects, so we will connect it talk loudly into the microphone.
to P1.
volume = pin1.read_analog()
to 1023 which relate to 0V to 3V. Anything over true then..else” block found in Logic. This block
1000 will trigger our project to life. handles decisions. Such as if the water is
touching the foil.
Step 1: Startup Screen
Step 4: Greater than?
tick to indicate readiness. comparison block and place that over the True of
the if block. Then change the < to a >.
Step 2: Slow down!
Step 5: Checking values
These blocks from Basic are “Show Icon”, which level is low.
Get in touch!
[Link]/contact
hello@[Link]
@micro_mag
80
:review Pimoroni touch:bit
Pimoroni
touch:bit
Six handy touch-sensitive
buttons and LEDs for your micro:bit.
automation:bit was.
The touch:bit provides a nice little touch interface for your micro:bit projects. Photo: Pimoroni
Pimoroni
automation:bit
Control and monitor your world
with automation:bit!
of electronic switch. This means that the
electronics from whatever you’re turning on
don’t come into contact with the micro:bit. This
is good for switching anything up to 24v - note
this means not mains devices, and unless you
have the relevant knowledge you shouldn’t put
than the hardware), this neat little circuit board sensors - light sensors, dimmer switches, knobs
packs a relay, some 24V-tolerant inputs and or dials…) to digital number signals that you can
24V-sinking outputs and a 24V-tolerant use in your code. The extra special thing about
3-channel ADC (don’t worry, we’ll explain all that the ADC on the automation:bit though, is that
Put simply, this board allows you to control things like cars and boats (again, not unless you
electronics that have a higher voltage than the know what you're doing), which use 12v power
with a micro:bit - neat! but they’re sinking rather than sourcing. This
means that you need to connect the positive
terminal of whatever needs turning on to your
In’s & Out’s
power source, but the negative terminal can be
Relays switch external loads - they’re like a sort
83
Pimoroni automation:bit :review
The automation:bit connects straight to the edge connector on the micro:bit. Plug and Play!
Photos: Pimoroni
attached to the output on the automation:bit. addition especially as it’s the language of choice
for most advanced projects.
The automation:bit is well designed, although
the screw terminals can be a little hard to use for We tried using the MakeCode library to switch a
fiddly fingers (we’d have preferred the set of USB (5v) fairy lights on and off depending
push-connector type which are easier to use). on the position of the compass - and it worked
The design is nice and clean, with some helpful fantastically. What could you control based on
hints for where to find out more info as well as the micro:bit’s inputs?
project examples and ideas.
Overall thoughts:
The support for MakeCode is plentiful, with clear
A really versatile piece of kit, but needs
instructions available on the github page,
micropython support to be truly useful for
although not in a particularly child-friendly more advanced projects and some more
format. Some more example project tutorials (a project ideas would be welcome.
la adafruit) would be great, but Pimoroni’s new
kits will partially cover that need.
Buy the automation:bit:
However, the lack of support for python is a little [Link]/autobit
disappointing - this would be a great
84
:review Adafruit Crickit for micro:bit
Adafruit
Crickit for micro:bit
The ultimate platform for building DIY
robots with micro:bit.
- Servo connectors
- Some I/O headers
We think that this is a pretty amazing range of
functionality that gets added to the micro:bit
when using Crickit, this definitely sets it apart
from other add-ons on the market, it’s ability to
platform to the micro:bit, joining their existing connector, sourcing a reputable DC power supply
line up of add-ons for the Feather, Circuit here in the UK can be quite expensive for some
Playground Express and the Raspberry Pi. This people. We have tested the Crickit with some
board aims to make building DIY robots as easy servos, motors and neopixels and we’re safe to
and simple as possible, basically the ultimate say this board makes it so easy for beginners to
- 4 Stepper motor outputs MakeCode extension, this isn’t any different for
The Crickit is easy to connect to your micro:bit, it’s simply plug + play! Photo: Adafruit
4Tronix
Bit:Commander
Control your next micro:bit project
with Bit:Commander!
● Analog dial input
● Analog Joystick
● Powered miniature speaker
This add-on has a really impressive range of
inputs to make the perfect controller for your
micro:bit projects. The Bit:Commander priced at
the main project. Most people use all sorts of ways and allows you to add batteries to make the
to control the other micro:bit, the A+B buttons, micro:bit completely portable. This saves you
different gestures and sometimes this can be from having a battery pack plugged into the JST
hard to remember or isn’t really practical. connector with no way to hold it in place or
This is where Bit:Commander comes in. This neat having your micro:bit powered via USB all the
little add-on aims to be the perfect board for time, however, do note that when you are
adding to your controller. It boasts a variety of programming and testing over USB, for the
different inputs as well as some programmable features to work, you need batteries plugged in
lights, let’s take a look at some of the features. and the On/Off power switch on. Like with most
add-on boards, the micro:bit slots into the
Bit:Commander via an Edge Connector, this
Features
makes it easy to use because it’s simply plug and
● 6 multi-colour RGB LEDs (aka neopixels)
play. The overall design feels really nice and
● 4 push buttons with coloured caps (Red.
works well as a handheld controller and one
Yellow, Green, Blue)
thing that we’d like to see in a future revision of
87
Bit:Commander :review
The Bit:Commander plugs into the micro:bit by it’s edge connector. Photo: Josh
this board is something like a Vibration motor to written by the community and there are
add to the controller experience, we really liked resources for both MakeCode & MicroPython.
this about another controller type board we They’re great for beginners and make it really
reviewed last Issue, the :GAME Bit 64. easy to get started.
[Link]
@micro_mag









