56. Case 55: Gyro Transmitter#

56.1. Introduction#

Make a gyro transmitter with Nezha 48 IN 1 Inventor’s Kit.

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

56.2. Quick to Start#

Materials Required#

Nezha 48 IN 1 Inventor’s Kit

Assembly steps#

Component Details

../../_images/neza-inventor-s-kit-case-55-02.png

Build it as the assembly steps suggest:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Connection Diagram#

As the picture suggests, onnect the Crash sensors to J1 port and the Motors to M1 on Nezha breakout board.

microbitKit/Nezha_Inventor_s_kit_for_microbit/images/neza-inventor-s-kit-case-55-03.png

56.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 the Crash sensor, we need to add a package. Enter “PlanetX” in the dialog box, and click search to download it.

images/neza-inventor-s-kit-case-37-05.png

For programming the Nezha. Click “Extensions” at the bottom of the drawer and search with “nezha” 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#

Program as picture suggests#

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

Reference#

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

You may also download it directly:

Result#

When the Crash sensor is pressed, the gyro transmitter starts to rotate, and when the crash sensor is released, the gyro transmitter stops rotating.