Case 23: The Locomotive
Contents
25. Case 23: The Locomotive#
25.1. Purpose#
Make a locomotive.
25.2. Link:#
25.3. Materials Required#
25.4. Bricks build-up#
25.5. Hardware Connection#
Connect a motor to M1 port on Wukong breakout board.
25.6. Software Platform#
25.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.