Example Code for micro:bit-Wireless Remote Control

- Learning Target: Learn the way of using microbit wireless. - Effect: Use the microbit gamePad to operate Maqueen.

Hardware Preparation

  • Maqueen Lite-micro:bit Educational Programming Robot Platform x 1 (ROB0148)
  • micro:bit board x 1
  • micro:bit Gamepad x 1

Software Preparation

  1. Makecode graphical online programming platform: makecode.microbit.org
  2. Maqueen library: Search for "dfrobot" in makecode extension and select "maqueen".
  3. GamePad library: Paste https://github.com/DFRobot/pxt-gamePad in makecode extension.

Wiring Diagram

No additional wiring required. The wireless module is integrated with micro:bit.

Other Preparation Work

Ensure both Maqueen and the Gamepad are powered on and paired.

Sample Code

  • Screenshot of Car's Makecode Graphical Program:

Program for Maqueen: https://makecode.microbit.org/_d4D02s0uX6da

  • Screenshot of Gamepad's Makecode Graphical Program:

Program for gamePad: https://makecode.microbit.org/_49mJKYK4V8c0

Result

Wireless Remote Control

Additional Information

Load the gamePad library: https://github.com/DFRobot/pxt-gamePad

Was this article helpful?

TOP