+21622886281
Micro:bit Servo motor

Control a servomotor using the buttons on the Micro:bit card

Purpose of this tutorial:

In this tutorial we will control the servomotor using the two buttons A and B of the micro: bit: If you press button A, the servomotor positions itself at the 90 ° angle. If you press button B, the servomotor positions itself at the 45 ° angle.

Components required

  • micro:bit card
  • servomotor
  • micro:bit GPIO Expansion Board
  • connecting wires

Mounting

The connection is almost always the same and will be done using 3 wires, the main colors of which you may encounter:

  • Red: + 5V power supply.
  • Black or brown: common to connect to the micro: bit GND
  • Pin Orange, yellow or white: positioning signal sent by the micro: bit card.

There are several mounting methods.

Makecode program

Here is the makecode program which allows you to control a servomotor using the buttons on the micro: bit card. Note: You must go to Extensions to import the servo extension.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top