2. Case 02: Line-following Cars#

2.1. Purpose#


To make a line following car.

../../_images/case-02-01.png

2.3. Materials Required#


../../_images/case-02-02.png

Video link: https://youtu.be/J2QKDKnTklw

2.4. Bricks build-up#


../../_images/step-case-02-01.png

../../_images/step-case-02-02.png

../../_images/step-case-02-03.png

../../_images/step-case-02-04.png

../../_images/step-case-02-05.png

../../_images/step-case-02-06.png

../../_images/step-case-02-07.png

../../_images/step-case-02-08.png

2.5. Hardware Connection#

将两个电机分别连接到悟空扩展板的M1,M2接口,将双路巡线传感器连接到悟空扩展板的P1和P2端口.

../../_images/Wonder-Building-Kit-case-02-06.png

2.6. Software Platform#


MakeCode

2.7. Coding#


Add extensions#

Click “Advanced” in the MakeCode to see more choices.

../../_images/case-01-03.png

Search with Wukong in the dialogue box to download it.

../../_images/case-01-04.png

Program#

../../_images/case-02-05.png

Link:https://makecode.microbit.org/_azffEJVztHiW