2. Case 02: Line-following Cars#

2.1. Purpose#

To make a line following car.


2.3. Materials Required#


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

2.4. Bricks build-up#









2.5. Installation Mthods of Hardwares#

Install the dual-line tracking sensor with the bricks.


2.6. Hardware Connection#

Connect two motors to M1 and M2, the dual line-following sensor to P1 and P2 ports on Wukong breakout board.


2.7. Software Platform#


2.8. Coding#

Add extensions#

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


Search with Wukong in the dialogue box to download it.






The car moves along with the maps at a uniform speed, it will keep its speed and directions if it deviates from the black line until it goes back.