+21622886281
Maqueen Micro:bit Project

Control of the Maqueen via a joystick

Purpose of this project:

This project aims to control the movement of the Maqueen with a joystick controller.

Regarding the joystick, the directions of its joystick allow the Maqueen to go forward, backward, left and right. When the joystick takes its initial position (neutral) the robot stops.

Thanks to the LED matrix of the micro:bit board connected to the controller, the direction of the Model will be displayed.

For the Maqueen, when it turns right, its LED on the right lights up and when it turns left, its LED on the left lights up.

Necessary hardware

We will need two micro:bit cards, one for the Maqueen robot and one for the joystick controller. As a result, there will be two programs.

For mounting the joystick and micro:bit, you can connect:

  • The +5V pin of the 3.3V joystick of the micro:bit
  • The GND pin of the joystick to the GND of the micro:bit
  • The VRx pin of the joystick to the P2 pin of the micro:bit
  • The VRy pin of the joystick to the P1 pin of the micro:bit
  • SW pin from joystick to micro:bit pin P0

Makecode program

Here is the makecode program for the micro:bit connected to the joystick

When the joystick controller returns to its initial position (neutral): The 2 pins P1 and P2 of the micro:bit return values between 500 and 520 and the micro:bit board radio sends the word ‘stop’ to the Maqueen micro:bit board.

Makecode program

Here is the makecode program for the micro:bit connected to the Maqueen




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée.

Scroll to Top