Velleman MICROBIT User manual

VMM502
V. 01 –17/01/2019 2 ©Velleman nv
USER MANUAL
1. Introduction
To all residents of the European Union
Important environmental information about this product
This symbol on the device or the package indicates that disposal of the device after its lifecycle could
harm the environment. Do not dispose of the unit (or batteries) as unsorted municipal waste; it
should be taken to a specialized company for recycling. This device should be returned to your
distributor or to a local recycling service. Respect the local environmental rules.
If in doubt, contact your local waste disposal authorities.
Thank you for choosing Velleman®! Please read the manual thoroughly before bringing this device into service.
If the device was damaged in transit, do not install or use it and contact your dealer.
2. Safety Instructions
This device can be used by children aged from 8 years and above, and persons with
reduced physical, sensory or mental capabilities or lack of experience and knowledge if
they have been given supervision or instruction concerning the use of the device in a
safe way and understand the hazards involved. Children shall not play with the device.
Cleaning and user maintenance shall not be made by children without supervision.
Indoor use only.
Keep away from rain, moisture, splashing and dripping liquids.
3. General Guidelines
Refer to the Velleman®Service and Quality Warranty on the last pages of this manual.
Familiarise yourself with the functions of the device before actually using it.
All modifications of the device are forbidden for safety reasons. Damage caused by user
modifications to the device is not covered by the warranty.
Only use the device for its intended purpose. Using the device in an unauthorised way
will void the warranty.
Damage caused by disregard of certain guidelines in this manual is not covered by the
warranty and the dealer will not accept responsibility for any ensuing defects or
problems.
Nor Velleman nv nor its dealers can be held responsible for any damage (extraordinary,
incidental or indirect) –of any nature (financial, physical…) arising from the possession,
use or failure of this product.
Due to constant product improvements, the actual product appearance might differ from
the shown images.
Product images are for illustrative purposes only.
Do not switch the device on immediately after it has been exposed to changes in
temperature. Protect the device against damage by leaving it switched off until it has
reached room temperature.
Keep this manual for future reference.

VMM502
V. 01 –17/01/2019 3 ©Velleman nv
4. Description
This starter kit is an educational kit based on micro:bit. It comes with basic electronic components, a
breadboard, connection wires and a micro:bit.
5. Getting Started
The programme is written in code blocks, online in the web browser. Open the website www.makecode.com or
https://www.microsoft.com/en-us/makecode?rtc=1 and click the micro:bit icon and click Start Project.
The micro:bit code block opens in a new window. Now, we can start composing the code with code blocks,
which we drag and drop from a code drawer to a code editor.
5.1 What is MakeCode?
Formerly PXT –Programming eXperience Toolkit Editor to write code for the micro:bit.
A graphical, beginner-friendly drag-and-drop code editor similar to Scratch. It works online, in the browser.

VMM502
V. 01 –17/01/2019 4 ©Velleman nv
You can see the editor is made up of different sections. You make your code in the Code Area, dragging out
blocks from the Code Drawer. You can immediately see your code results in the micro:bit simulator. At the
bottom is where you download and save your project.
Next, we will take a closer look at how to use the Options Bar for doing other things.
Options Bar
Click to create or add a new project.
Import your projects here.
Open up the Blocks interface to write your scripts with the Block editor.
Open up the Javascript interface to type out your script in the Javascript
language.
Handy reference when you are unsure about how the various blocks and functions
work.

VMM502
V. 01 –17/01/2019 5 ©Velleman nv
Shortcuts to changing project properties. Rename and delete your projects here.
Reset deletes all the projects that you have saved, so be very careful. Most of
the time, you will just want to stick to Delete Project.
Using the LED Bar
We start by writing some code! Each time you select from the Code Drawer, it will list all the codes available to
you. Drag out the show string block and click inside the box to edit.
1
Select
3
Click to edit
2
Drag
See what happens in the micro:bit simulator!

VMM502
V. 01 –17/01/2019 6 ©Velleman nv
Say Hello!
The text you have been displaying are called strings.
You can show any integer in the LED screen using show number or any 5x5 pixel image using show leds.
You can also plot one point LED at the time using co-ordinates. Co-ordinate (0,0) is the top left corner.
Joining Blocks
Click and hold the block you would like to join. Drag the block to the target block until a side of the target block
is highlighted. Release and the two blocks are now joined!
Clicking on the first block will move the second; clicking on the second will detach it from the first.

VMM502
V. 01 –17/01/2019 7 ©Velleman nv
Testing on micro:bit
Connect the micro;bit to your computer using a micro-USB cable.
It will go through a default sequence, asking you to press buttons and play a game. Try it out!
Click Download to translate your script to a hex file and to download it.
If you set Chrome up properly, you will not need this next step. Drag the downloaded hex file to the micro:bit
drive, or right-click and Send To in Windows®.
You have just programmed your very own device!
6. Parts –micro:bit
1. Micro-USB
Plug into a computer or power source.
2. LED array
25 on-board red lights to display animations
or text.
3. Pin edge connector
Ground, voltage and pins to connect to
sensors, motors and lots more!
4. Compass
Detects magnetic fields to determinate
direction.
5. Accelerometer
Measures acceleration, shake, tilt, and fall of
your micro:bit.
6. Wireless communication
Talk to your smartphone, computer or even
another micro:bit.
7. Reset button
Press this to restart the programme on your
micro:bit.
8. Battery connector
Connect a battery pack to make your
projects portable.

VMM502
V. 01 –17/01/2019 8 ©Velleman nv
7. Parts –Kit
1. Breakout board (BoB)
Plug in your micro:bit and play with different
sensors and outputs.
2. Mini servo
Make arms and legs, and make them move!
3. OLED
For when you’re done waiting for sentences to
scroll across the micro:bit screen.
4. Passive buzzer
Because the micro:bit cannot Make sound on its
own.
5. LED module
25 RGB LEDs.
6. PIR sensor
This is essentially a motion detector. Try moving
past it.
7. Crash sensor
It could be a button, but way easier to press.
Great for telling if your little robot has hit
something.
8. Soil moisture sensor
Passes tiny currents through the two prongs to
determine conductivity (air –0, water –1023).
9. Potentiometer
Turn the knob to control things.

VMM502
V. 01 –17/01/2019 9 ©Velleman nv
10. ADKeypad
Many buttons!
8. Projects
8.1 Project 1 –Music Machine
Let’s make some music!
1
micro-USB cable
4
BoB
2
micro:bit
5
ADKeypad
3
passive buzzer
What do I need?
1x micro:bit
1x micro-USB cable
1x BoB
1x mini buzzer
1x ADKeypad
2x female-female jumper wires
Let’s get started!
Step 1
After connecting one end of the USB cable to your computer, connect the other end to the micro:bit.
Insert the micro:bit into the BoB.

VMM502
V. 01 –17/01/2019 10 ©Velleman nv
Step 2
Connect the buzzer to P0 on the BoB.
Connect the ADKeypad to P2 on the BoB.
Make sure for all components that the colour of the wires matches the colour of the pins on the
breakout board.
G = ground = black wire, V (3V3) = power = red wire, S = data or signal pin = yellow wire.
Step 3 –Pre-Coding
Go to http://www.makecode.com. Click onto the micro:bit button to enter the code editor.
We will need to add a package of code to be able to use our kit components. Click on Advanced in the
Code Drawer to see more code sections and look at the bottom of the Code Drawer for Add Package =
Extensions.
The following pop-up window appears.
Now we search for Tinkercademy. Type Tinkercademy in the search box and hit enter.
Click on the Tinkercademy (button) package for downloading and adding it into the Code Drawer.
Click on the Tinkercademy button.

VMM502
V. 01 –17/01/2019 11 ©Velleman nv
Step 4
Click on Tinkercademy or OLED inside the Code Drawer to find our custom blocks for the various
components in your kit.
Next, let’s create a conditional statement if then else as shown in the picture. You will find this block in
the Logic section of the Code Drawer.
The code shown below means that, when button A is pressed on the ADKeypad while the ADKeypad is
plugged in at pin 2 (P2) of the BoB, the buzzer will play a sound of 175 Hertz.
Since there are 5 buttons, we need to code 5 similar conditional statements. Each button ‘controls’ a
sound of a particular pitch and so pressing each button produces sounds of different pitches.
When complete, we compile the programme to generate a .hex file. Click on the download button and
save the .hex file to the Downloads folder (C:\downloads). This .hex file is ready to be uploaded to the
micro:bit.
Plug the micro:bit into the USB port via the micro-USB cable. Then, drag and drop the .hex-file (from
the Downloads folder) onto the micro:bit Removable device to upload the programme.
Now, you can play music by pressing the keys on the ADKeypad. Enjoy!

VMM502
V. 01 –17/01/2019 12 ©Velleman nv
8.2 Project 2 –Smart Light
A smart light for smart Tinkerers!
1
micro-USB cable
4
BoB
2
micro:bit
5
LED
3
PIR sensor
What do I need?
1x micro:bit
1x micro-USB cable
1x BoB
1x PIR sensor
1x LED
2x female-female jumper wires
Let’s get started!
Step 1
Insert the micro:bit into the BoB and connect the PIR sensor into pin 0 (P0).
Connect the LED to pin 1 (P1). Make sure for both components that the colour of the wires matches the
colours of the pins (S = yellow, V (3V3) = red, G = black).

VMM502
V. 01 –17/01/2019 13 ©Velleman nv
Step 2 –Pre-Coding
Refer to Project 1, Step 3 –Pre-Coding.
Step 3 –Coding
Click on Tinkercademy inside the Code Drawer to find our custom blocks for the various components
in your kit.
Next, let’s create a code as shown in the picture. For this project, no initialisation is required and there
isn’t much code anyway.
First, drag and drop the logic function if then else in the code editor under the forever block. The
block if then else can be found in the Logic in Code Drawer.
Next, add the motion detector at pin P0 detects motion block next to the if logic. Replace the true
block. The blocks snap together. The block motion detector at pin P0 detects motion can be found
in the Tinkercademy in Code Drawer.

VMM502
V. 01 –17/01/2019 14 ©Velleman nv
Now, drag and drop the block toggle LED at pin P0 Off next the then logic. Set pin P0 to P1 and set
Off to ON.
Finally, drag and drop the block toggle LED at pin P0 Off next to the else logic. Set pin P0 to P1.
If motion is detected by the PIR sensor, the light is triggered (the LED will light). Else, the light is
turned off.
When complete, we compile the programme to generate a .hex file. Click on the download button and
save the .hex file to the Downloads folder (C:\downloads). This .hex file is ready to be uploaded to the
micro:bit.
Plug the micro:bit into the USB port via the micro-USB cable. Then, drag and drop the .hex-file (from
the Downloads folder) onto the micro:bit Removable device to upload the programme.
Voilà! You have created a simple smart light. Walk into the room and let it light!
8.3 Project 3 –Simple Alarm Box
Sound the alarm box!
1
micro-USB cable
4
BoB
2
micro:bit
5
LED
3
crash sensor
6
OLED
What do I need?
1x micro:bit
1x micro-USB cable
1x BoB
1x crash sensor
1x OLED
1x LED
2x female-female jumper wires

VMM502
V. 01 –17/01/2019 15 ©Velleman nv
Let’s get started!
Step 1
Insert the micro:bit into the BoB.
Connect the crash sensor to pin 0 (P0), the green LED to pin 4 (P4) and the red LED to pin 1 (P1) using
the jumper wires Make sure for all components that the colour of the wires matches the colour of the
pins on the breakout board.
Plug the OLED into the I²C row at the bottom of the BoB as shown in the image.
Step 2 –Pre-Coding
Refer to Project 1, Step 3 –Pre-Coding.

VMM502
V. 01 –17/01/2019 16 ©Velleman nv
Click on Tinkercademy or OLED inside the Code Drawer to find our custom blocks for the various
components in your kit.
Step 3 –Coding
Use blocks under the Tinkercademy or OLED section, to initialize the OLED and crash sensor as shown
in the picture below.
The block on start can be found in the Basic in Code Drawer. The block initialize OLED with height
64 width 128 can be found in the OLED in Code Drawer. The block setup crash sensor at pin P0
can be found in the Tinkercademy in Code Drawer.
Drag and drop the blocks as shown below.

VMM502
V. 01 –17/01/2019 17 ©Velleman nv
The block show string can be found in the OLED in Code Drawer. The digital write pin P0 to 0 block
can be found in the Advanced Pins in the Code Drawer.
Since there are only two conditions, we need only one else if statement. When the crash sensor is
pressed, the green LED will light up. Else, if no force is applied to the crash sensor, the red LED will
blink continuously.
When complete, we compile the programme to generate a .hex file. Click on the download button and
save the .hex file to the Downloads folder (C:\downloads). This .hex file is ready to be uploaded to the
micro:bit.
Plug the micro:bit into the USB port via the micro-USB cable. Then, drag and drop the .hex-file (from
the Downloads folder) onto the micro:bit Removable device to upload the programme.
8.4 Project 4 –Plant Monitoring Device
Set up a plant monitor!
1
micro-USB cable
5
OLED
2
micro:bit
6
mini servo (not used)
3
passive buzzer
7
soil moisture sensor
4
BoB
What do I need?
1x micro:bit
1x micro-USB cable
1x BoB
1x passive buzzer
1x moisture sensor
1x OLED
2x female-female jumper wires

VMM502
V. 01 –17/01/2019 18 ©Velleman nv
Let’s get started!
Step 1
Insert the micro:bit into the BoB and plug in the micro-USB cable. Then, plug in the OLED as shown.
You should be able to plug it into any of the three rows.
Plug the buzzer into pin 0 (P0).
Plug in the moisture sensor to P1. Make sure the colour of the wire follows the coloured pins on the
break out board.
Step 2 –Pre-Coding
Refer to Project 1, Step 3 –Pre-Coding.
Click on Tinkercademy or OLED inside the Code Drawer to find our custom blocks for the various
components in your kit.

VMM502
V. 01 –17/01/2019 19 ©Velleman nv
Step 3 –Coding
Drag and drop the blocks as shown below in picture.
You should always initialize the OLED at the beginning. 64 and 128 represent the height and width of
the OLED respectively.
The block if then else can be found in the Logic in Code Drawer.
The block smaller than can be found in the Logic in Code Drawer. Drag and drop this block next to
the if block. Replace the true block. They will snap together.
Drag and drop the block value of moisture sensor at pin P0 over the first 0 of the logic comparison.
You can find this block in the Tinkercademy in Code Drawer.
Set the value of the logic function smaller than to 50. Modify value of moisture sensor at pin P0 to
P1. The code should look like the illustration below.

VMM502
V. 01 –17/01/2019 20 ©Velleman nv
micro:bit continuously reads the values from the moisture sensor. Since there are only two conditions,
we need only one if then else statement.
When the moisture sensor value is less than 50, this indicates that there is not enough water in the pot.
As a result, the buzzer will sound and the OLED will display the message Water your plant!. Else, if
the moisture sensor value is larger than 50, the buzzer will not sound and the OLED will display the
message Your plant is in good condition.
Use this device with original accessories only. Velleman nv cannot be held responsible in the event of damage or
injury resulting from (incorrect) use of this device. For more info concerning this product and the latest version
of this manual, please visit our website www.velleman.eu. The information in this manual is subject to change
without prior notice.
© COPYRIGHT NOTICE
The copyright to this manual is owned by Velleman nv. All worldwide rights reserved. No part of this manual may
be copied, reproduced, translated or reduced to any electronic medium or otherwise without the prior written consent of the
copyright holder.
This manual suits for next models
1
Table of contents
Languages:
Other Velleman Science Education Product manuals
Popular Science Education Product manuals by other brands

3D Molecular Designs
3D Molecular Designs Synapse Construction Kit Assembly instructions

Gaumard
Gaumard NOELLE S554.100 user guide

Bavarian Demon
Bavarian Demon CORTEX quick start guide

SNAP CIRCUITS
SNAP CIRCUITS BRIC: STRUCTURES instruction manual

TruCorp
TruCorp AirSim Child user manual

ModelCraft
ModelCraft MC-800 operating instructions