Recently, Xiaomi was very happy to play a supporting role in a four-wheel drive car race.
It seems that boys are somewhat obsessed with cars.
Mi Dad has also grown up this way.
Let’s play with Xiaomi and make a little car tutorial using micro:bit!
About Materials
Similar items can be found on Taobao.
Chassis, motors, and wheels are plentiful.
Here are the references.
The materials for the first stage include:
Aluminum alloy chassis ×1
TT motors ×2
Rubber wheels ×2
Steel ball universal wheels ×2
Robotbit expansion board ×1
micro:bit ×1
M3 nylon pillars or copper pillars ×4
M3*6 screws ×4
M3*25 screws and nuts ×4
I used KITTENBOT’s aluminum alloy chassis.
Some holes come with M3 threads, making fastening very convenient.
Next, we install the TT motors.
We need 4 long M3*25 screws.
Remember to get them all when shopping on Taobao, or the shipping might be more expensive than the screws!
Refer to the above image and align the screw holes and positions.
Use a cross screwdriver to tighten.
If you have the M3 socket as shown above, it will be much easier to screw.
Now, let’s put on the wheels.
The wheel hub has a square hole that fits the TT motor shaft directly.
Remember to leave a little gap and not touch the fixed screws of the TT motor.
The chassis is basically complete now.
The bit’s vehicle still needs a sofa (expansion board).
The expansion board is fixed using nylon pillars.
Corresponding to the 4 installation holes of the expansion board, tighten the screws one by one.
Next, complete the wiring for the motors and the expansion board.
As shown, lead from the chassis.
Right motor connection:
Red – – A-
Black – – A+
Left motor connection:
Red – – B+
Black – – B-
At this point, the hardware part of this lesson is complete.
It feels much simpler than assembling a four-wheel drive car.
Next, we will start writing the car control program.
We will still use Microsoft’s makecode.
However, we need to add an extension package to support the functionality of the expansion board.
Go to https://makecode.microbit.org
It is recommended to click “Read the original text“
Download the new offline editor provided by Xiaomi.
After loading the editor, perform the following operations:
Input “robotbit” and click the search button.
Load the robotbit extension package from the official website.
Click to load automatically.
If you see the Robotbit appear in the command area, you have succeeded.
Robotbit has a lot of extension blocks.
In the first lesson, we will only use the module to start the motors in “concurrent”.
Build the program with the combination of blocks above.
Send it to micro:bit.
Please let little bit sit on the red car.
Turn on the power of the expansion board.
Press the A key to start!
It went off course directly!
This is quite different from what I imagined.
Actually, it is normal for it to run off course.
Because the motor speeds have deviations.
It just varies in consistency.
In the next lesson, we will try to make the red car run straight as much as possible!
Previous Fun Courses
[Micro Lesson] Xiaomi Fun with micro:bit 01 HELLO, DIMI!
[Micro Lesson] Xiaomi Fun with micro:bit 02 “Heart Thumping”
[Micro Lesson] Xiaomi Fun with BBC micro:bit 03 Bomb Man (1)
[Micro Lesson] Xiaomi Fun with BBC micro:bit 04 Bomb Man (2)
[Micro Lesson] Xiaomi Fun with BBC micro:bit 05 Play a tune “Twinkle Twinkle Little Star”
[Micro Lesson] Xiaomi Fun with BBC micro:bit 06 Digital Dice
[Micro Lesson] Xiaomi Fun with BBC micro:bit 07 Flower Monitor
[Micro Lesson] Xiaomi Fun with BBC micro:bit 08 Halloween Trick
[Micro Lesson] Xiaomi Fun with BBC micro:bit 09 Steve’s Metal Detector
[Micro Lesson] Xiaomi Fun with BBC micro:bit 10 Bear Grylls’ New Compass
[Micro Lesson] Xiaomi Fun with BBC micro:bit 11 Autumn Pants Summoning Artifact
[Micro Lesson] Xiaomi Fun with BBC micro:bit 12 A Cup of Temperature (Part 1)
[Micro Lesson] Xiaomi Fun with BBC micro:bit 13 A Cup of Temperature (Part 2)
[Micro Lesson] Xiaomi Fun with BBC micro:bit 14 Bool’s Love Night Light
[Micro Lesson] Xiaomi Fun with BBC micro:bit 15 Hogwarts Magic School’s New Apprentice
[Micro Lesson] Xiaomi Fun with BBC micro:bit 16 Turkey Hunter
[Micro Lesson] Xiaomi Fun with BBC micro:bit 17 Stuart Little
[Micro Lesson] Xiaomi Fun with BBC micro:bit 18 Step Counter Bracelet
[Micro Lesson] Xiaomi Fun with BBC micro:bit 19 Thunderbolt Ranger
[Micro Lesson] Xiaomi Fun with BBC micro:bit 20 Writing “Chuan” with Code
Mi Dad’s Digital Laboratory
-
Fun with DF Boson Micro:bit Heart Rate Sensor
-
Mi Dad’s Digital Lab: Fun with micro:bit Racing
-
When Little Makers Dive into the Herb Garden – An Integrated Practice Course Attempt Based on micro:bit
-
micro:bit Becomes Bug Agent
-
KITTENBOT MP3 Module First Taste Test
-
Remote Monitoring, Real-time Recording, Animation Prompt, Turn WU-LINK into IoT Flower Nurse for 1 Yuan
-
micro:bit Becomes Electromagnetic Radiation Tester
-
Examining from a “God’s Eye View”, Maker Dad’s Examination of German Milk Based on Elliptical Mark
-
Soft and Hard, Two-pronged Approach – Initial Testing of DF Micro:Mate Expansion Board and BXY Editor
-
Thunderbolt Baby Becomes You, I Think It’s About Winter
-
Angry Little Particle – Review of Panwen Lily Particle Expansion Board
-
Archive: Be a Transporter for SpaceX (Including Heavy Falcon Launch, Recovery, Starman Space View, Merlin Engine Test Video)
-
micro:bit Becomes Wealthy Piggy Bank, Wishing Everyone Prosperity in the New Year!
-
OTTO Little Green Monster Egg Life Record
-
New School Equipment, Launching 20 micro:bit Magazines!
-
Still struggling with whether the furniture is environmentally friendly, whether the formaldehyde in the new house has dissipated? It’s time to DIY an IoT formaldehyde monitoring device in 10 minutes!
Critical Thinking
-
Completing Professional Growth While Being a Dad
-
It Should Have Warmth – A Few Words on the Decoration and Arrangement of Maker Spaces
-
Small but Strong, BBC micro:bit is About to Counterattack Maker Education
-
Discussing Craftsmanship Spirit from an 80 Yuan Tire Repair
-
Initial Experience of Classroom Teaching with BBC micro:bit and Suggestions for Teaching Environment Deployment
-
Using Maker Methods to Analyze the “Guidelines for Comprehensive Practical Activities in Primary and Secondary Schools”