3. Case 01: The Motorcycle

3.1. Purpose


To make a motorcycle with the Wonder Building kit.

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

3.3. Materials Required


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

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

3.4. Bricks build-up


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

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

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

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

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

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

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

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

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

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

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

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

3.5. Hardware Connection

Connect two motors to M1 and M2 ports on Wukong breakout board.

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

3.6. Software Platform


MakeCode

3.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

Result

While button A being pressed, the motorcycle moves forward and it reverses if button B is pressed, while pressing button A+B, it stops driving.