Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use micro:bit: Examples, Pinouts, and Specs

Image of micro:bit
Cirkit Designer LogoDesign with micro:bit in Cirkit Designer

Introduction

The micro:bit is a small, programmable microcontroller board designed for educational purposes. It features an array of built-in sensors, buttons, and a 5x5 LED matrix, making it an excellent tool for learning coding and creating interactive projects. Its compact size and versatility allow users to explore a wide range of applications, from simple games to complex IoT projects.

Explore Projects Built with micro:bit

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Adafruit Crickit Controlled Robotics Platform with Micro:bit
Image of Circuit Design for Recyclo-Bot: A project utilizing micro:bit in a practical application
This circuit is designed to control multiple motors and servos using an Adafruit Crickit for microbit as the main controller, interfaced with a micro bit microcontroller. It includes two yellow hobby gear motors, two 9G micro servos, and two standard servos, all powered and controlled by the Crickit board. Additionally, there is a 0.96" OLED display for output and a piezo sensor, likely for input, connected to the Crickit, which is programmed via the micro bit.
Cirkit Designer LogoOpen Project in Cirkit Designer
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
Image of godmode: A project utilizing micro:bit in a practical application
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
Image of Copy of Smarttt: A project utilizing micro:bit in a practical application
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
Image of TILTPCB: A project utilizing micro:bit in a practical application
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with micro:bit

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Circuit Design for Recyclo-Bot: A project utilizing micro:bit in a practical application
Adafruit Crickit Controlled Robotics Platform with Micro:bit
This circuit is designed to control multiple motors and servos using an Adafruit Crickit for microbit as the main controller, interfaced with a micro bit microcontroller. It includes two yellow hobby gear motors, two 9G micro servos, and two standard servos, all powered and controlled by the Crickit board. Additionally, there is a 0.96" OLED display for output and a piezo sensor, likely for input, connected to the Crickit, which is programmed via the micro bit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of godmode: A project utilizing micro:bit in a practical application
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Smarttt: A project utilizing micro:bit in a practical application
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of TILTPCB: A project utilizing micro:bit in a practical application
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Educational tools for teaching programming and electronics
  • Interactive games and animations
  • Prototyping IoT devices and smart systems
  • Robotics and motor control
  • Environmental monitoring using built-in sensors

Technical Specifications

The micro:bit is equipped with a variety of features that make it a powerful and versatile tool for beginners and advanced users alike.

Key Technical Details

  • Processor: 32-bit ARM Cortex-M0 CPU
  • Flash Memory: 256 KB
  • RAM: 16 KB
  • Power Supply: 3V (via battery pack) or 5V (via USB)
  • Connectivity: Bluetooth Low Energy (BLE), USB
  • Sensors: Accelerometer, Magnetometer (Compass)
  • I/O Pins: 25 edge connector pins (3 are large and user-friendly)
  • Display: 5x5 LED matrix
  • Buttons: 2 programmable buttons (A and B)
  • Other Features: Temperature sensor, light sensor, and touch-sensitive logo

Pin Configuration and Descriptions

The micro:bit has 25 edge connector pins, but the most commonly used pins are the 3 large ones (P0, P1, P2) and the power pins. Below is a table summarizing the key pins:

Pin Name Description
P0 Pin 0 General-purpose I/O pin, often used for analog or digital input/output.
P1 Pin 1 General-purpose I/O pin, often used for analog or digital input/output.
P2 Pin 2 General-purpose I/O pin, often used for analog or digital input/output.
3V 3V Power Provides 3V power output for external components.
GND Ground Ground connection for completing circuits.
P3-P22 Other GPIO Pins Additional general-purpose I/O pins available via the edge connector.

Usage Instructions

The micro:bit is designed to be beginner-friendly and can be programmed using block-based editors like Microsoft MakeCode, Python, or JavaScript. Below are the steps to use the micro:bit in a circuit and some best practices.

How to Use the micro:bit

  1. Power the micro:bit:
    • Connect the micro:bit to your computer using a micro-USB cable.
    • Alternatively, use a battery pack with 2 AAA batteries for portable projects.
  2. Write and Upload Code:
    • Use the Microsoft MakeCode editor or Python editor to write your program.
    • Download the compiled .hex file and drag it onto the micro:bit drive that appears on your computer.
  3. Connect External Components:
    • Use alligator clips or a breakout board to connect external components (e.g., LEDs, sensors) to the edge connector pins.
  4. Run the Program:
    • Once the code is uploaded, the micro:bit will automatically start running the program.

Important Considerations and Best Practices

  • Avoid shorting the pins or connecting components that draw excessive current.
  • Use resistors when connecting LEDs to prevent damage to the micro:bit.
  • Ensure the micro:bit is powered off when connecting or disconnecting external components.
  • For wireless communication, ensure Bluetooth is enabled in your code.

Example: Using the micro:bit with an Arduino UNO

The micro:bit can communicate with an Arduino UNO via serial communication. Below is an example of Python code for the micro:bit and Arduino code for the UNO.

micro:bit Python Code

from microbit import *

Send data to Arduino via serial communication

while True: # Send a message every second uart.write("Hello Arduino!\n") sleep(1000)


Arduino UNO Code

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
}

void loop() {
  if (Serial.available() > 0) {
    // Read data from the micro:bit
    String message = Serial.readString();
    Serial.println("Received: " + message); // Print the received message
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. micro:bit Not Detected by Computer:

    • Ensure the USB cable is a data cable (not just a charging cable).
    • Try a different USB port or restart your computer.
    • Check if the micro:bit's power LED is on.
  2. Code Not Running on the micro:bit:

    • Verify that the .hex file was successfully copied to the micro:bit drive.
    • Ensure the code is free of syntax errors.
    • Reset the micro:bit by pressing the reset button on the back.
  3. External Components Not Working:

    • Double-check the wiring and connections.
    • Ensure the components are compatible with the micro:bit's voltage and current ratings.
    • Test the components separately to confirm they are functional.

FAQs

Q: Can I use the micro:bit without a computer?
A: Yes, you can power the micro:bit using a battery pack and run pre-uploaded programs.

Q: How do I reset the micro:bit?
A: Press the small reset button on the back of the micro:bit to restart it.

Q: Can I connect the micro:bit to Wi-Fi?
A: The micro:bit does not have built-in Wi-Fi, but you can use external modules like the ESP8266 or ESP32 for Wi-Fi connectivity.

Q: What programming languages are supported?
A: The micro:bit supports block-based coding (MakeCode), Python, and JavaScript.