Awesome Microbit
Awesome Microbit
Awesome Microbit
micro:bit
learn micro:bit fun and fast
PREFACE
In the name of Allah, the Most Gracious and the Most Merciful. Peace and
blessings of Allah be upon His messenger, Muhammad and all his family and
companions.
Alhamdulillah, all praises to Allah for the blessing and guidance in completing this
book.
This book is published specifically to help educators and student to learn and
master all the micro:bit related knowledge and skills. This book is structured as
one of the teaching and learning materials in carrying out micro:bit activities that
have been planned in the school. The content in this book is based on lab
exercise and mini project with complete circuit diagrams, block programming and
steps of the program developed to facilitate student's understanding.
This book have been written by Mr Johari bin Ghazali, Mr Azhar bin Ab Hamid and
Mr Mohamad Shahrin bin L Bari. We are the lecturers at Information Technology
and Communication Deparment, Polytechnic Kuching, Sarawak. We realize that
this book is still far from perfect. All the criticism and opinions from all parties are
very much welcome for the improvement of this book in the future.
Lastly, we would like to take this opportunity to express our gratitude to our
family, colleagues and those who have been directly or indirectly involved in the
production of this book from the start. May Allah SWT always be pleased with all
our efforts, InshaAllah.
We hope this book can inspire all the reader, especially the educators and
students who are interested in the knowledge in this field.
ABSTRACT
Nowadays, digital technologies are part of our life. Because of that it is important
to start teaching technologies in early life of every student. However, teaching
computer science or information technology in all level of education is not easy.
Therefore this book is produce as a reference material to help all the educators
and students who want to getting start learn micro:bit. This book will cover the
topic on introduction to Internet Of Things (IOT), Introduction to micro:bit, the
software and exercise which might help them to understand and get a better
ideas to developed an application using micro:bit. Various lab exercise is included
in this book to help them understand the use of every component and also to
help them to understand how the block programming language works. By refer to
this book, it will help them learn better and faster by follow all the lab exercise
and mini project. Once they follow all the exercise and mini project, thet might
develop a more interesting ideas in the future. The micro;bit might be small but if
we have all the knowledge and ideas, it might be a powerful devices. Learn the
basic is the most crucial part in a way of making a great application by using
micro:bit.
CONTENT
Introduction to Micro:bit 2
Exercise 7
Mini Project 32
Troubleshoot Tips 37
er net of
Int T)
gs (IO
Thin
Introduction to
Internet of Things
What make IOT very popular nowadays ? It is because IOT have the
capability to deliver a solutions that dramatically improve energy
efficiency, security, health, education and many other aspect in our
daily life. Because of the rapid development in IOT nowadays, it even
can underpin solutions that improve decision making and productivity.
1
o:bit
micr
Introduction to
micro:bit
2
Table 1 show the function for every component on the micro:bit board
Table 2 show the function for every sensor on the micro:bit board
3
kecode
ma
Intoduction to
makecode software
Figure 2
4
Here are the lighting notes for each interface layout in the software :
E-Editing Zone
This zone allows you to
edit the code that you have
built. The functions
contained in this zone are
undo, foward, zoom in and
zoom out.
5
BASIC STEP ON USING
MICRO:BIT
1
Launch a makecode software
Go to https://makecode.microbit.org. You can
using this software online or you can also
download it and using it offline.
Do your program
2
You can do your program by using block
programming or by writing your code using
python or javascript programming
language.
3
Once you finish with your program, you need to
download the program. You can do that by click
on the download button at the download / save
zone.
4
Once you download the program, make sure
that the file is in .hex format. Now you can
copy the file inside the micro:bit drive. Please
note that if there's a program before, it will
replace it.
6
AWESOME
EXERCISE
cise 1
Exer
LCD DISPLAY
MICRO:BIT
CODE BLOCK
7
STEPS
8
cise 2
Exer
SOUND
MICRO:BIT
CODE BLOCK
9
STEPS
10
cise 3
Exer
SOUND & BUTTON
PART 1
MICRO:BIT
CODE BLOCK
11
STEPS
12
cise 4
Exer
SOUND & BUTTON
PART 2
MICRO:BIT
CODE BLOCK
13
STEPS
14
STEPS
15
cise 5
Exer
SERVO MOTOR &
BUTTON
MICRO:BIT
CODE BLOCK
16
STEPS
17
cise 6
Exer
LED
MICRO:BIT
CODE BLOCK
18
STEPS
19
cise 7
Exer
BLINK LED &
BUTTON
MICRO:BIT
CODE BLOCK
20
STEPS
21
STEPS
22
cise 8
Exer
MULTIPLE LED &
BUTTON
MICRO:BIT
CODE BLOCK
23
STEPS
This program will make one LED blinking for every 1 second if
button “A” is pressed, two LED blinking for every 1 second if
button “B” is pressed and turn off both LED if button “A+B” is
pressed.
24
STEPS
25
cise 9
Exer
LIGHT SENSOR
AND LED
MICRO:BIT
CODE BLOCK
26
STEPS
27
cise 10
Exer
BLUETOOTH
MICRO:BIT
CODE BLOCK
28
STEPS
29
STEPS
30
STEPS
31
AWESOME
MINI PROJECT
JECT 1
PRO
CLAP TURN ON
AND OFF LIGHT
MICRO:BIT
CODE BLOCK
32
STEPS
This program will make LED turn on once the sound sensor
detect a loud sound. It also will turn off once the sound sensor
detect a loud sound again.
33
JECT 2
PRO
TEMPERATURE
AND SERVO MOTOR
MICRO:BIT
CODE BLOCK
34
STEPS
35
STEPS
36
TROUBLESHOOT TIPS
37
REFERENCE
Patel, K keyur & Patel, M Sunil. (2016). Internet of Things-IOT : Definition,
Characteristics, Architecture, Enabling Technologies, Application & Future
Challenges. Research Article. Maharaja Sayajirao University
Wolfram Donat. (2017). Make : Getting Started with the micro:bit. San Francisco :
Maker Media Inc
Pradeeka Seneviratne. (2018). Beginning BBC micro:bit : A practical Introduction
to micro:bit development. Sri Lanka : Apress