CH 01
CH 01
H E
Chapter 1
Introduction to Maqueen Plus
Introduction
1 2 3 4 5 6 7 8 9 10
11
16 12
13
17
14
18 15
19 20 21 22 23 24 25 26 27 28 29
M3 Electricity
11 12 R3 indicator LED 13 Battery case 14 15 Right wheel
Mounting holes indicator LED
Line-tracking Charging
16 L3 indicator LED 17 18 Left wheel 19 Charging port 20
Calibration Key indicator LED
31 32 33 34 35
30 36
35 L2 line-tracking 36 L3 line-tracking
sensor sensor
We can see that Maqueen has equipped with so many functions, and now you must can’t wait to try them. OK,
here we go!
Assembly
Maqueen Plus Assembly Diagram
Note: when the battery is fully charged, all LEDs will be on. The LEDs will be off one by one as the power
gradually decreases. If all lights go out, the battery needs to be recharged.
After we assembled Maqueen Plus, put it aside because first, we need to get familiar with it’s most important
controller device---micro:bit. Just like the CPU in a computer, micro:bit is Maqueen’s “brain” for storing and process-
ing data, which also is the key to make Maqueen Plus “alive”.
Introduction to micro:bit
Battery
Low power Box Port
consumption USB
Bluetooth module BLE ANTENNA
RESET
BATTERY
Button A Button B
Magnetometer PROCESSOR
COMPASS
ACCELEROMETER
PINS
Accelerometer
micro:bit Programming
We can directly program micro:bit online without installing any software. There is a huge community of people
making tools for programming and interacting with the micro:bit which means you can program your micro:bit in
Python, C++ and other languages, including all kinds of block editors like Mind+, Blocks, Javascript, Python, Scratch.
In this tutorial, we will use MakeCode to program, click the link https://makecode.microbit.org/ to enter Make-
Code online programming environment.
Enter MakeCode
2.Open MakeCode editor and create a new project to enter MakeCode programming interface.
Editing Section
Command
Simulator Blocks
Home & Share Home: create a new project, open tutorial, game, music, fashion
Share: publish your project to share it or embed it in other web pages.
Blocks: graphical programming, suitable for beginners, primary and middle school students.
Interface Switch
JavaScript: code in JavaScript, suitable for high school, college students, and above.
Setting Setting: project setting, extensions, language, delete project, reset, etc.
Command Blocks Blocks: 17 categories of programming blocks and more extended blocks.
Editing Section Programming Editor: construct your program by dragging and snapping colorful blocks
Download Section Download: download the program you edited into micro:bit.
After we got a general understanding of MakeCode, let’s step on our journey to code! In the first example, we
will learn how to write and download a program.
1.Write a program
Step 1: drag the block we need to the editing section.
Step 2: to remove a block, drag it from the editing section to the command section, or right-click to delete.
Knowledge Expansion
Hover your mouse pointer over the block,
then the pointer will become
“ ” ; left-click to select the block, the point-
er becomes “ “; when you drag the block to
the command section, it will become “ “ ,
then release the mouse to remove the block.
Step 3: after we completed a program, check its effect via the simulator.
2.Prepare to download
Connect the micro:bit board to your computer by a USB cable. There will be a hard-disk named micro:bit ap-
pearing in your computer when the connection is successful.
MICROBIT(I:)
3.Download
Click “Download” to download the program into your micro:bit.
Note: when downloading a program, the micro:bit power indicator will keep flashing, and please do not discon-
nect the USB cable.
MICROBIT(I:)
Download
File name: xxxxxxx.hex
4. Download completes
Once the downloading is completed, the micro:bit LED screen will show a heart pattern.
Since we have learned the basics about Maqueen Plus, micro:bit and MakeCode programming, so for the next
chapter, we are going to write a program to let micro:bit to drive Maqueen Plus.