Welcome to Building:bit Superkit repository
3.Powerful carrier
Powerful carrier
Powerful carrier1. Learning Objectives2. Building Blocks3. Motor Wiring4. Code analysis5. Write and download the program6. Experimental phenomenon
1. Learning Objectives
In this course, we mainly learn how to implement it through Python programming. After pressing the A button of micro:bit, the car moves forward for 2 seconds -> turns left for 1 second -> unloads the goods -> the loading platform is laid flat -> turns left for 1 second -> moves forward for 2 seconds.
2. Building Blocks
For the steps of building blocks, please refer to the installation drawings of [Assembly course]-[Skip car] in the materials or the building block installation album.
3. Motor Wiring
The motor wiring on the left side of the car is inserted into the M1 interface of the Super:bit expansion board, and the black wire is close to the battery side;
The motor wiring on the right side of the car is inserted into the M3 interface of the Super:bit expansion board, and the black wire is close to the battery side;
The building block servo wiring is inserted into the S1 interface of the Super:bit expansion board, and the orange servo wiring is inserted into the yellow pin of S1.
As shown below:

! Notes:
When conducting a course related to the building block servo for the first time, we need to remove the gear on the servo and upload the program of this course to the micro:bit; then turn on the power switch of the Super:bit expansion board and wait for the building block servo to turn to the initial position; then, we can turn off the power, adjust the angle of the car loading platform to be parallel to the ground, and then install the servo gear. (If you have used the dump truck and servo-related programs before, you can skip this step)

4. Code analysis
For the program of this course, please see the Powerful carrier.py file.
from microbit import *import superbitimport microbitFirst, import the libraries needed for this lesson from microbit: the superbit library is compatible with the superbit expansion board;
xxxxxxxxxxdisplay.show(Image.HAPPY)superbit.