Introduction Micro:bit

Introduction Micro:bit

What is Micro:bit ?

Microbit, or BBC micro:bit, is a small computer designed to make it easier for children and beginners to learn about programming and electronics. Microbit was first launched by the BBC in 2015 as part of a technology education initiative.

Physical Form

  • Size: Very small, about 4 cm x 5 cm (smaller than a credit card).
  • Main Components:
    • Processor: ARM Cortex-M0, a power-efficient microprocessor.
    • LED Matrix: 5×5 LED dots to display patterns, numbers, letters, or simple images.
    • Buttons: Two buttons (A and B) that can be programmed for various functions.
    • I/O Pins: There are input/output pins to connect sensors, actuators, or other devices.
  • Internal Sensors:
    • Accelerometer: Measures motion or orientation.
    • Compass: For detecting direction.
    • Light and Temperature Sensors: In addition to some versions.
  • Communication:
    • Bluetooth LE (Low Energy) for communicating with other devices such as smartphones.
    • Radio for communication between microbits.

Features and Functions

  • Extremely Easy to Use: Microbit is designed for beginners to get started right away, with a simple interface and clear tutorials.
  • Visual Programming: Can be programmed using drag-and-drop editors such as Microsoft MakeCode.
  • Programming Language Support:
    • Block-based coding (MakeCode).
    • Python (MicroPython).
    • JavaScript.
  • Project Expansion: Microbit can be connected to additional devices such as motors, external LEDs, and sensors to create more complex projects.

How to run microbit

To run micro:bit, the steps are very simple. Here is a complete guide to get started:

1. Prepare Equipment

  • BBC micro:bit (micro:bit board).
  • USB cable (micro USB to USB Type-A) to connect to a computer or laptop.
  • Computer or Laptop with access to a programming editor (MakeCode, Python, or other).
  • (Optional) External Battery (2x AAA batteries) if you want to run the micro:bit without a computer.

2. Software Installation (Optional)

  • MakeCode Editor (for block-based or JavaScript programming):
  • Go to the MakeCode micro:bit site.
  • MicroPython Editor:
  • Use a Python editor such as Mu Editor, or a plain text editor.
  • No additional installation is required if using a web-based editor.

3. Connect micro:bit to a Computer

  • Connect the micro:bit to your computer using a USB cable.
  • The micro:bit will appear on the computer like a USB flash drive with the name “MICROBIT”.

4. Write a Program

  • Using MakeCode:
    • Go to the MakeCode website.
    • Select “New Project” to get started.
    • Drag and drop blocks of code to create the program.
    • Click Download to download the program file (.hex).
  • Using MicroPython:
    • Open a Python editor (for example, Mu Editor).
    • Write Python code. A simple example:
    • Click the “Flash” button in the editor to upload the code.
from microbit import *
while True:
    display.scroll('Hello, World!')
    sleep(1000)

5. Upload Program to micro:bit

  • Copy the program file (.hex) to the “MICROBIT” drive like moving a normal file.
  • Micro:bit will start the upload process (the indicator light will blink).
  • Once completed, the program will run automatically in micro:bit.

6. Run the Program

  • After the upload is complete, the program will be immediately run by micro:bit.
  • You can see the results on the LED matrix or other outputs that match your code.

7. Use Batteries (Optional)

  • If you want to run micro:bit without a computer:
  • Connect an external battery (2x AAA batteries) to the battery port on the micro:bit.
  • The micro:bit will run the last program uploaded.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *