49. Case 48:The Walking Robot#

49.1. Introduction#

Build a walking robot with the Nezha Inventor’s Kit.

../../_images/neza-inventor-s-kit-case-48-01.png

49.2. Quick to Start#

Materials Required#

Nezha Inventor’s Kit

Assembly#

Components List

microbitKit/Nezha_Inventor_s_kit_for_microbit/images/neza-inventor-s-kit-case-48-02png

Build it as the assembly steps suggest:

../../_images/neza-inventor-s-kit-step-48-01.png

../../_images/neza-inventor-s-kit-step-48-02.png

../../_images/neza-inventor-s-kit-step-48-03.png

../../_images/neza-inventor-s-kit-step-48-04.png

../../_images/neza-inventor-s-kit-step-48-05.png

../../_images/neza-inventor-s-kit-step-48-06.png

../../_images/neza-inventor-s-kit-step-48-07.png

../../_images/neza-inventor-s-kit-step-48-08.png

../../_images/neza-inventor-s-kit-step-48-09.png

../../_images/neza-inventor-s-kit-step-48-10.png

../../_images/neza-inventor-s-kit-step-48-11.png

../../_images/neza-inventor-s-kit-step-48-12.png

../../_images/neza-inventor-s-kit-step-48-13.png

../../_images/neza-inventor-s-kit-step-48-14.png

../../_images/neza-inventor-s-kit-step-48-15.png

../../_images/neza-inventor-s-kit-step-48-16.png

../../_images/neza-inventor-s-kit-step-48-17.png

../../_images/neza-inventor-s-kit-step-48-18.png

../../_images/neza-inventor-s-kit-step-48-19.png

../../_images/neza-inventor-s-kit-step-48-20.png

../../_images/neza-inventor-s-kit-step-48-21.png

../../_images/neza-inventor-s-kit-step-48-22.png

../../_images/neza-inventor-s-kit-step-48-23.png

../../_images/neza-inventor-s-kit-step-48-24.png

../../_images/neza-inventor-s-kit-step-48-25.png

../../_images/neza-inventor-s-kit-step-48-26.png

../../_images/neza-inventor-s-kit-step-48-27.png

../../_images/neza-inventor-s-kit-step-48-28.png

../../_images/neza-inventor-s-kit-step-48-29.png

../../_images/neza-inventor-s-kit-step-48-30.png

../../_images/neza-inventor-s-kit-step-48-31.png

../../_images/neza-inventor-s-kit-step-48-32.png

../../_images/neza-inventor-s-kit-step-48-33.png

../../_images/neza-inventor-s-kit-step-48-34.png

../../_images/neza-inventor-s-kit-step-48-35.png

Connection Diagram#

Connect the motors to M1 on Nezha Breakout Board.

../../_images/neza-inventor-s-kit-case-43-03.png

49.3. MakeCode Programming#

Step 1#

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

../../_images/neza-inventor-s-kit-case-37-04.png

For programming Nezha Breakout Board, we need to add a package. Search with “Nezha” in the dialogue box and click to download it.

../../_images/neza-inventor-s-kit-case-37-06.png

Notice: If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu.

Step 2#

Code as the picture suggests#

../../_images/neza-inventor-s-kit-case-44-07.png

Reference#

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

You may also download it directly:

Result#

After pressing button A, the robot moves forward. After pressing button B, the robot stops moving.