Example Code for micro:bit-Basic Usage

Last revision 2026/01/07

This article offers a comprehensive guide on using micro:bit with example code, detailing hardware and software setup, wiring, and expected results, especially beneficial for beginners looking to understand micro:bit basics.

Hardware Preparation

  • Micro:bit x 1
  • Micro:mate x 1
  • DFRobot Gravity: Digital Shake Sensor x 1
  • Gravity 3P digital wire (or Dupont wires) x 1

Software Preparation

Wiring Diagram

Sample Code

Was this article helpful?

TOP