Purpose of this tutorial:
In this tutorial we will see how to display an arrow on micro:bit whose orientation depends on the direction of the joystick controller:
- When the user directs the joystick controller to the right, the arrow ” →” is displayed on the micro:bit card.
- When the user points the joystick to the left, the arrow “←” is displayed on the micro:bit card.
- When the user points the joystick joystick forward, the arrow “↑” is displayed on the micro:bit card.
- When the user moves the joystick backwards, the arrow “↓” is displayed on the micro:bit card.
- When the user presses the joystick button, the value 1 is displayed on the micro:bit card.
Composants nécessaires
- carte micro:bit
- manette joystick
- des fils de connexion
- micro:bit GPIO Expansion Board
- plaque d’essai (Pour le montage 1)
Mounting:
To perform the assembly we connect:
- The +5V to 3.3V pin of the micro:bit
- The GND pin to the GND from the micro:bit
- VRx to the pin P2 from the micro:bit
- VRy to the pin P1 from the micro:bit
- SW to the pin P0 from the micro:bit
There are several mounting methods.