Case 23: The Locomotive
Contents
23. Case 23: The Locomotive#
23.1. Purpose#
Make a locomotive.
23.2. Link:#
23.3. Materials Required#
23.4. Bricks build-up#
23.5. Hardware Connection#
Connect a motor to M1 port on Wukong breakout board.
23.6. Software Platform#
23.7. Coding#
Add extensions#
Click “Advanced” in the MakeCode to see more choices.
Search with Wukong in the dialogue box to download it.
Program#
Result#
When button A is pressed, the locomotive moves forward; when button B is pressed, the locomotive moves backward; when button A+B is pressed, the locomotive stops moving.