10. Case 07: Remote Control¶
10.2. Products Link¶
10.3. Background Knowledge¶
10.5. Program¶
Step 1¶
Click “Advanced” in the drawer of MakeCode to see more choices.
For programming the Wonder Rugged Kit, we need to add a package. Click “Extensions” at the bottom of the drawer and then search “Wukong” in the dialogue box to download it.
For programming the Joystick:bit, we need to add a package. Click “Extensions” at the bottom of the drawer and then search “joystickbit” in the dialogue box to download it.
Note: If you get a warning indicating some packages will be removed because of incompatibility issues, you can follow the prompts or create a new project in the menu.
Step 2¶
Below is the code for Wonder Rugged Kit:
Begin with radio set group and initialize the servos. Save the radio received value in I
to control the movement of the car.
Step 3¶
Below is the code for Joystick:bit:
Begin with the radio set group and send number through the status of the joystick handle and the buttons.
Program¶
Links for Wonder Rugged Kit: https://makecode.microbit.org/_MC9gcKYXpJxW
You can also download it directly below:
Links for Joystick:bit: https://makecode.microbit.org/_e5dHb6c9xbt8
You can also download it directly below:
Result¶
The movement of the car can be controlled via Joystick:bit.