KS4013 (4026) Keyestudio Microbit Desk Bit Mini Car
KS4013 (4026) Keyestudio Microbit Desk Bit Mini Car
com
Contents
1. Description:............................................................................................................... 3
2. Kit:................................................................................................................................ 4
3. Preparation:...............................................................................................................8
3.1. Micro:bit............................................................................................................ 8
4. Programming:........................................................................................................ 15
Step 2: Programming:.............................................................................. 17
1
www.keyestudio.com
4.2. Makecode:................................................................................................... 22
After downloading the tool package, you can open a file named
everywhere in your computer. Open the file and you will find following
files:........................................................................................................................... 35
7. Projects:....................................................................................................................68
Project 1: Heartbeat............................................................................................. 69
Project 7: Accelerometer.................................................................................... 95
2
www.keyestudio.com
7. Resources:............................................................................................................. 193
1. Description:
delicate servos, a control board with high quality and a yellow car body,
which is extremely cool. You can control it via App or controller. In addition,
3
www.keyestudio.com
Features:
Equipped with RGB light, battery holder, sensors and modules, the
control board can drive three servos at same time.
21 projects included
2. Kit:
Components
Micro:bit V2 is
0 1
included in KS4026
4
www.keyestudio.com
Keyestudio Control
1 1
Board
2 360° Servo 2
3 180° Servo 1
2 Wheels 2
3 Universal Wheel 1
Nuts/Screws
5
www.keyestudio.com
M3*60MM
1 Dual-pass Hex 3
Copper Pillar
M3*30MM
2 Dual-pass Hex 3
Copper Pillar
M3*30+6MM
3 1
Copper Pillar
M3*35MM
4 Dual-pass Hex 1
Copper Pillar
M3*12+6MM
5 1
Copper Pillar
M3*16MM Round
6 1
Head Screws
M2*10MM Round
7 8
Head Screws
M3*6MM Round
8 12
Head Screws
M3*12MM Round
9 8
Head Screws
6
www.keyestudio.com
M3 Nickel Plated
10 8
Nuts
M3 Nickel Plated
11 2
Self-locking Nuts
M2 Nickel
12 8
Plated Nuts
M1.2*5MM Round
13 Head Self-tapping 6
Screws
Tools
WB-558 White
1 1
Board Pen
3.0*40MM
2 1
Screwdriver
2.0*40MM
3 1
Screwdriver
4 M3+M4 Wrench 1
1.5V AA Batteries
5 (Not included in 3
the kit)
7
www.keyestudio.com
3. Preparation:
3.1. Micro:bit
buttons, compass, Micro USB port, Bluetooth module, etc. It is only half the
size of a credit card (4cm×5cm), but very powerful. It can be used to edit
8
www.keyestudio.com
Micro:bit V2
9
www.keyestudio.com
Micro:bit V1.5
10
www.keyestudio.com
You can reboot micro:bit V2 when pressing reset and power button.
LED will get dark and the power-saving mode will be activated if you keep
11
www.keyestudio.com
pressing reset and power button, which can make the life expectancy of
More resources:
Micro:bit Pinout
V2
12
www.keyestudio.com
V1.5
Official website:
https://tech.microbit.org/hardware/edgeconnector/
https://microbit.org/guide/hardware/pins/
Note:
a. Put it on with silicone case to prevent the short circuit due to electronic
components on micro:bit V2
13
www.keyestudio.com
it.
c. We supply power via USB port or 3V port of micro:bit V2. However, the
micro:bit shield is needed if you use 5V sensor because its voltage is 3V.
But, you need to install the driver of micro:bit if it’s your first time to use
micro:bit.
14
www.keyestudio.com
folder.
4. Programming:
V2. There are detailed tutorials in the official website, as shown below:
https://microbit.org/guide/quick/
15
www.keyestudio.com
Interface micro:bit with your computer using USB cable.(Guide to mobile &
tablet apps:https://microbit.org/get-started/user-guide/mobile/).
16
www.keyestudio.com
Step 2: Programming:
https://www.microsoft.com/zh-cn/p/makecode-for-micro-bit/9pjc7sv48lc
x?ocid=badgep&rtc=1&activetab=pivot:overviewtab
17
www.keyestudio.com
Through MakeCode editor, you just need to drag blocks from block area
into code editing area to program. Then run this code, as shown below:
18
www.keyestudio.com
However, follow the steps below if you program via online makecode
editor.
MICROBIT(E)”.
19
www.keyestudio.com
20
www.keyestudio.com
The yellow indicator will flash when transferring“hex” into micro:bit V2.
21
www.keyestudio.com
https://microbit.org/code/
https://microbit.org/projects/
4.2. Makecode:
online makecode editor. Perhaps, you can open makecode app for
Windows 10.
22
www.keyestudio.com
shown below:
Setting
“+” zoom in
Download “-” zoom out
code Program
name
23
www.keyestudio.com
code are only executed once, however, “forever”implies that code runs
cyclically.
You can refer to the following steps to connect and pair device.
Pairing Device:
24
www.keyestudio.com
25
www.keyestudio.com
Then select the device you want to connect and tap“connect ” in the
window.
https://makecode.microbit.org/device/usb/webusb/troubleshoot
What’s more, if you don’t know how to update the firmware of micro:bit,
folder we provide.
26
www.keyestudio.com
micro:bit V2.
27
www.keyestudio.com
Next, we need to import Desk Bit extension library for further lessons.
28
www.keyestudio.com
29
www.keyestudio.com
30
www.keyestudio.com
Note: the extension library added is only valid to one project, therefore,
You need to import Desk Bit extension library again when creating new
projects.
31
www.keyestudio.com
32
www.keyestudio.com
33
www.keyestudio.com
Download Link:https://fs.keyestudio.com/KS4013-4026
34
www.keyestudio.com
After downloading the tool package, you can open a file named KS4013
your computer. Open the file and you will find following files:
We provide every program with hex file. You can import it directly or
added.
35
www.keyestudio.com
36
www.keyestudio.com
37
www.keyestudio.com
38
www.keyestudio.com
In addition to the above method of importing code , you can also directly
drag code into the Makecode compiler, as shown in the figure below:
39
www.keyestudio.com
40
www.keyestudio.com
https://freeware.the-meiers.org/
(1) After the download, we need to install CoolTerm win , and we take
(2) Choose“win”
(3) Unzip file and open it. (also suitable for Mac and Linux system)
(4) Double-click
Note: Firstly, you have to install the driver of micro:bit and connect
41
www.keyestudio.com
micro:bit V2 to computer.
42
www.keyestudio.com
Format
43
www.keyestudio.com
a. Preparations:
Note: take out the 5 pcs M3*6MM flat screws from control board
b. Then fix micro:bit onto control board with 5 pcs M3*6MM flat screws, as
44
www.keyestudio.com
shown below;
45
www.keyestudio.com
46
www.keyestudio.com
47
www.keyestudio.com
48
www.keyestudio.com
49
www.keyestudio.com
50
www.keyestudio.com
51
www.keyestudio.com
52
www.keyestudio.com
53
www.keyestudio.com
54
www.keyestudio.com
55
www.keyestudio.com
56
www.keyestudio.com
57
www.keyestudio.com
8. Mount Wheels
58
www.keyestudio.com
59
www.keyestudio.com
60
www.keyestudio.com
Component 180°servo
P0
SERVO 3
61
www.keyestudio.com
Download code to micro:bit V2 and plug in power with USB cable. Rotate
servo to 0°
62
www.keyestudio.com
63
www.keyestudio.com
64
www.keyestudio.com
65
www.keyestudio.com
P0 P1 P2
66
www.keyestudio.com
SERVO 3
11. Insert the control board with micro:bit V2 into the car
67
www.keyestudio.com
6. Projects:
68
www.keyestudio.com
Project 1: Heartbeat
1.Description:
Prepare a Micro:bit V2, a USB cable and a computer. Next we will conduct a
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3. Wiring Up:
Interface micro:bit V2 with your computer using micro USB cable.
69
www.keyestudio.com
4.Test Results:
Download code to micro:bit V2 (refer to chapter 4.3), and keep micro USB
ceaselessly.
70
www.keyestudio.com
1. Description:
In this project, we will turn on one LED of micro:bit V2.
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
Interface micro:bit V2 with your computer using micro USB cable.
4. Component Overview:
correspond to x and y axis. Then the 5*5 matrix is formed. Moreover, every
71
www.keyestudio.com
instance, set coordinate point(0,0)to turn on the LED at row 1 and column
1; light up LED at the row 1 and column 3, we could set(2,0) and so on.
5.Test Results
72
www.keyestudio.com
the LED at coordinate point (1,0) flashes for 1 s and the LED at (3,4)blinks
73
www.keyestudio.com
1.Description:
Dot matrix gains popularity in our life, such as LED screen, bus station and
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3. Wiring Up:
Interface micro:bit V2 with your computer using micro USB cable.
74
www.keyestudio.com
4. Test Code:
75
www.keyestudio.com
5.Test Results:
76
www.keyestudio.com
Download code to micro:bit V2, and and keep USB cable connected.
1. Description:
77
www.keyestudio.com
Micro:bit V2 has three buttons which are the reset button on the back and
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
4.Test Code 1:
78
www.keyestudio.com
5. Test Results 1:
5×5 LED dot matrix will show“A”if button A is pressed, in case that button
6.Test Code 1:
79
www.keyestudio.com
7.Test Results 2:
1.Description:
2.Components:
Micro:bit V2 *1
Micro USB Cable*1
80
www.keyestudio.com
3.Wiring Up:
Interface micro:bit V2 with your computer using micro USB cable.
Download code to micro:bit V2 and plug in power with USB cable. Then
81
www.keyestudio.com
Open serial interface and display the temperature value, as shown below:
82
www.keyestudio.com
Open CoolTerm, click Options to select SerialPort. Set COM port and
The serial monitor shows the current ambient temperature value, as shown
below:
83
www.keyestudio.com
84
www.keyestudio.com
85
www.keyestudio.com
86
www.keyestudio.com
1.Description:
addition to detecting the strength of the magnetic field, it can also be used
field is ±50 gauss. In this project, we will introduce how compass detect
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3. Wiring Up:
87
www.keyestudio.com
As the button A is pressed, LED dot matrix indicates that “ TILT TO FILL
The calibration method: rotate the micro:bit V2 to make LED dot matrix
display a full square (25 LEDs are on), as shown in the following figure:
88
www.keyestudio.com
The calibration won’t be finished until you view the smile pattern
appear.
The serial monitor will show 0°, 90°, 180° and 270° when button A is
pressed.
89
www.keyestudio.com
The above code means that the direction is North and the value of
90
www.keyestudio.com
and 337.5. The value should be 293 and 338 because decimal is not
91
www.keyestudio.com
92
www.keyestudio.com
93
www.keyestudio.com
6. Test Result2:
After calibration(see the result1) and tilt micro:bit V2, the direction signs
94
www.keyestudio.com
will be shown.
Project 7: Accelerometer
1. Description:
The micro:bit V2 has a built-in LSM303AGR three-axis acceleration sensor
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
95
www.keyestudio.com
3. Wiring Up:
96
www.keyestudio.com
number 5 is displayed:
97
www.keyestudio.com
board damage)
98
www.keyestudio.com
Download code to micro:bit V2, keep USB cable connected, and click
99
www.keyestudio.com
100
www.keyestudio.com
101
www.keyestudio.com
Set COM port and 115200 baud rate(the baud rate of USB serial
Click“OK” and“Connect”.
as shown below:
102
www.keyestudio.com
103
www.keyestudio.com
1.Description:
This project will introduce how micro:bit V2 detects the external light
detection of light intensity is completed through the LED matrix. When the
light irradiates the LED matrix, the voltage change will be produced.
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
104
www.keyestudio.com
105
www.keyestudio.com
Download code to micro:bit V2 and keep USB cable connected, and click
106
www.keyestudio.com
The intensity value is 0 when covering LED dot matrix. And the value varies
with the light intensity. When placing micro:bit V2 under the sunlight, the
stronger the light is, and the larger the intensity value is. As shown below:
107
www.keyestudio.com
108
www.keyestudio.com
“COM” port and 115200 baud rate(the baud rate of USB serial
Then click“OK”and“Connect”.
109
www.keyestudio.com
Project 9: Speaker
1. Description:
The micro:bit V2 has built-in speaker for emitting different tones. You can
2.Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
110
www.keyestudio.com
111
www.keyestudio.com
112
www.keyestudio.com
113
www.keyestudio.com
114
www.keyestudio.com
115
www.keyestudio.com
116
www.keyestudio.com
117
www.keyestudio.com
118
www.keyestudio.com
More resource:https://en.wikipedia.org/wiki/Numbered_musical_notation
119
www.keyestudio.com
1. Description:
capacitive touch sensor which can sense the tiny changes in the current.
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
120
www.keyestudio.com
Micro:bit V2 will show“❤ ”if you touch logo , on the contrary, the
1.Description:
The micro:bit V2 has a built-in microphone which can detect the sound
121
www.keyestudio.com
Its indicator will turn on if you clap your hands; therefore, we can make an
2. Components:
Micro:bit V2 *1
Micro USB Cable*1
3.Wiring Up:
122
www.keyestudio.com
Download code to micro:bit V2, and keep micro USB connected. Pattern
Download code to micro:bit V2 and keep micro USB cable connected. Click
123
www.keyestudio.com
The output sound value increases when the sound amplifies, as shown
below;
124
www.keyestudio.com
Micro:bit V2 will show the maximum value of sound intensity(Note: set the
maximum value via reset button), when button A is pressed; whereas, the
125
www.keyestudio.com
1.Project Description:
The Micro: Bit main board V2 comes with a nRF52833 processor (with
2. Preparation
*Attach the Micro:bit main board V2 to your computer via the Micro USB
126
www.keyestudio.com
cable.
3.Procedures:
computer first, and then click “Download pairing HEX file”to download
the Micro: Bit firmware to a folder or desk, and upload the downloaded
127
www.keyestudio.com
128
www.keyestudio.com
Search “micro bit”in your App Store to download the APP micro:bit.
Connect your Apple device with Micro: Bit main board V2:
Firstly, turn on the Bluetooth of your Apple device and open the APP
Please make sure that the Micro: Bit main board V2 and your computer are
129
www.keyestudio.com
130
www.keyestudio.com
Following the instructions to press button A and B at the same time(do not
release them until you are told to) and press Reset & Power button for a
few seconds.
Release the Reset & Power button, you will see a password pattern shows
on the LED dot matrix. Now , release buttons A and B and click Next.
131
www.keyestudio.com
132
www.keyestudio.com
133
www.keyestudio.com
Set the password pattern on your Apple device as the same pattern
134
www.keyestudio.com
Still click Next and a dialog box props up as shown below. Then click
"Pair". A few seconds later, the match is done and the LED dot matrix
135
www.keyestudio.com
136
www.keyestudio.com
After the match with Bluetooth, write and upload code with the App.
Click “Create Code” to enter the programming page and write code.
137
www.keyestudio.com
138
www.keyestudio.com
139
www.keyestudio.com
140
www.keyestudio.com
Click the third item“Flash”to enter the uploading page. The default code
program for uploading is the one saved just now and named "1" and then
141
www.keyestudio.com
142
www.keyestudio.com
143
www.keyestudio.com
If the code is uploaded successfully a few seconds later, the App will
emerge as below and the LED dot matrix of the Micro: Bit main board V2
144
www.keyestudio.com
Projects below all conduct with the built-in sensors and the LED dot matrix
while the following ones will carry out with the help of external sensors.
(Attention:to avoid burning the the Micro:bit main board V2, please
remove the USB cable and the external power from the board before
fix it with a T-shaped shield; likewise, the USB cable and the external
power should be cut from the main board before disconnect the shield
145
www.keyestudio.com
1. Description:
The control board comes with five SK6812-P4 RGB lights controlled by
micro:bit V2. In this lesson, we will make five SK6812-P4 RGB lights display
three effects.
Note: the servo of car’s arm is interfaced with P0. You can control it via
DIP switch
Control board:
https://wiki.keyestudio.com/KS0493_Keyestudio_Micro_bit_Shield_For_Min
i_Servo_Car
Preparation:
(3) Dial the DIP switch of mini servo car to ON end and plug in power
146
www.keyestudio.com
(4) Dial the DIP switch of mini servo car to RGB end to control RGB
You don’t need to add Desk Bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
147
www.keyestudio.com
Five pcs WS2812 RGB lights of mini servo car turn on, changing color one
by one.
148
www.keyestudio.com
149
www.keyestudio.com
150
www.keyestudio.com
151
www.keyestudio.com
5 pcs WS2812RGB of control board display random color, like flow light.
1.Description:
152
www.keyestudio.com
2. Preparation:
(3) Dial the DIP switch of mini servo car to ON end and plug in power
(4) Dial the DIP switch of mini servo car to SERVO end to control servo.
You don’t need to add Desk Bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
3. Components:
housing, circuit board, core-less motor, gear and position sensor. Its
153
www.keyestudio.com
working principle is that the servo receives the signal sent by MCU or
receiver and produces a reference signal with a period of 20ms and width
of 1.5ms, then compares the acquired DC bias voltage to the voltage of the
In general, servo has three line in brown, red and orange. Brown wire is
grounded, red one is positive pole line and orange one is signal line.
360° servo only controls the direction and speed instead of angles like
180° servo.
360° Servo:
154
www.keyestudio.com
For instance, the servo is controlled by pin P1 of micro:bit V2. The speed of
below:
0 ° means the full speed along one direction, 0 ° ~90 ° implies that the
155
www.keyestudio.com
for the increasing speed along the opposite direction, and 180 means full
180° Servo:
The speed of servo can be set by filling number in the box behind“to”, as
shown below:
When rotating to 90°, the arm of desk bit car is on the middle level.
156
www.keyestudio.com
157
www.keyestudio.com
The right wheel rotates for 5s, stops for 2s, rotates anticlockwise for 5s and
stops 2s.
1. Description:
lesson, we will control the arm of desk bit car to perform a series of actions.
158
www.keyestudio.com
2.Preparation:
You don’t need to add Desk Bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
159
www.keyestudio.com
Plug in power, touch logo of V2 board, then desk bit car will rotate its arm;
however, the arm of desk bit car will return the original place if not
touching logo; V2 board will show how many times you touch.
1.Description:
This chapter introduces how to control 360° servo. We will make desk bit
car go forward and backward, turn left and right and stop.
2. Preparation:
160
www.keyestudio.com
You don’t need to add Desk Bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
161
www.keyestudio.com
Download code to micro:bit V2, dial DIP switch to ON end to power on. The
1. Description:
162
www.keyestudio.com
In this lesson, we will make desk bit car sing and dance.
2.Preparation:
You don’t need to add Desk Bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
163
www.keyestudio.com
164
www.keyestudio.com
165
www.keyestudio.com
166
www.keyestudio.com
167
www.keyestudio.com
Music Note:
168
www.keyestudio.com
More resource:https://en.wikipedia.org/wiki/Numbered_musical_notation
button, you will hear a song and desk bit car will go forward and backward,
1.Description:
169
www.keyestudio.com
2.Components:
Micro:bit V2 *1
Micro USB Cable*1
3. Wiring Up:
4.Game 1:
This game should be played on micro:bit V2. There are random LED G1 and
When G1 and G2 are falling down, you can move them to left and right
If one of them attacks G, game will be over. However, game starts when
170
www.keyestudio.com
171
www.keyestudio.com
Download code to micro:bit V2. You can view some random LEDs falling.
Then you need to press button A and B to stop them from attacking G.
6. Game 2:
For game 2, we make a change in the game 1. You can be given one point if
G avoids the random falling down LED, however, if it meets random LED,
game will be over and the scores will appear. Press button A and B at same
172
www.keyestudio.com
173
www.keyestudio.com
Download code to micro:bit V2. You can press button A and B to control G
174
www.keyestudio.com
You can be given one point if G dodges the random falling and lit LED,
however,if it meets random LED, game will be over and the scores will
1. Description:
The micro:bit V2 integrates the low consumption BLE device and pairs with
device.
In this project, we will introduce how to use App and its App interface.
2. Preparation:
175
www.keyestudio.com
However, you need to add Bluetooth extension library first if you intend to
The prompt will inform of you to delete radio library, as shown below
176
www.keyestudio.com
177
www.keyestudio.com
Note: you can skip this step if you directly import code.
Next to download code to micro:bit V2 and plug in power with USB cable.
IOS system
178
www.keyestudio.com
c. After the download, open Desk Bit app and click“OK”, as shown below.
179
www.keyestudio.com
Bluetooth is connected.
Android System
https://play.google.com/store/apps/details?id=com.keyestudio.deskbit to
download App. Perhaps you can download Desk Bit App in the Google play
180
www.keyestudio.com
store.
as shown below;
181
www.keyestudio.com
“COM” port and 115200 baud rate(the baud rate of USB serial
Then click“OK”and“Connect”.
182
www.keyestudio.com
1.Description:
In this lesson, we will make micro:bit V2 show pictures and numbers via
183
www.keyestudio.com
App.
3. Preparation:
However, you need to add Bluetooth extension library first if you intend to
184
www.keyestudio.com
Download code to micro:bit V2, and plug in power with USB cable.
185
www.keyestudio.com
1. Description:
In previous lesson, we introduced how to use App and test each icons.
In this lesson, we will control the desk bit car via App to make it perform
186
www.keyestudio.com
different functions.
2. Preparation:
You don’t need to add desk bit extension library(refer to chapter 4.6) if
However, you need to add desk bit extension library first if you intend to
187
www.keyestudio.com
188
www.keyestudio.com
189
www.keyestudio.com
190
www.keyestudio.com
Note: Remember to dial the DIP switch to RGB end if you want to
191
www.keyestudio.com
Dial DIP switch to SERVO end if you want to control the servo of right
arm.
Drawing
192
www.keyestudio.com
Place the pen of this kit into circular column, set code and download it to
micro:bit V2, then the mini car can draw on the paper. Furthermore, you
can make desk bit car push light stuffs by setting code.
7. Resources:
https://makecode.microbit.org/
https://tech.microbit.org/hardware/
https://microbit.org/new-microbit/
https://www.microbit.org/get-started/user-guide/overview/
https://microbit.org/get-started/user-guide/features-in-depth/
https://tech.microbit.org/hardware/edgeconnector/
https://microbit.org/guide/hardware/pins/
https://microbit.org/guide/quick/
https://microbit.org/get-started/user-guide/mobile/
https://microbit.org/code/
https://microbit.org/projects/
193