Micro:bit Physical computing guides
No. 3: Servos
Connecting a Servo to a micro:bit
Instructions on how to attach a Servo to a BBC micro:bit.
What you will need
Instructions on how to attach a Servo to a BBC micro:bit.
What you will need
- BBC micro:bit
- Micro USB cable
- Battery pack with 2 x AAA batteries
- 1 x Servo
- 3 x Breadboard jumper wires
- 3 x Crocodile clip leads
Servo
Wiring instructions
- Disconnect the micro:bit from your computer and disconnect the battery pack.
- Insert the jumper wires into the servo plug. See figure 1. (if you don’t have a black, red or orange jumper wires, you can replace these with any colour you wish as long as you remember which jumper wire is connected to which lead on your servo!)
- Connect the crocodile clips to the corresponding jumper wires:
- Brown to GND pin.
- Red to 3V.
- Orange to Pin 0.
Programming your Servo
Copy the below:
Programming your Servo
Copy the below:
Testing your code
Testing your code
- Download your program to your micro:bit.
- Reconnect your battery and run your program.