Code Example for Button-Controlled Servo

Control the rotation angle of the servo with a button using BOS0002, SER0045, Micro:bit, and BOSON Expansion Board. Follow the wiring diagram and MakeCode example for setup. It's like adjusting a volume knob with a switch.

Project Introduction:

Control the rotation angle of the servo with a button.

Component List:

  • BOS0002 Button Module
  • SER0045 9g Metal Gear Micro Servo Module
  • MBT0039 Micro:bit
  • BOS0040 Micro:bit BOSON Expansion Board

Wiring Diagram:

MakeCode Program Example:

Demo Video:

Was this article helpful?

ON THIS PAGE

TOP