What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Hello and welcome back, In this tutorial, we will learn what is the Micro:bit and how to blink an LED bulb using the Micro:bit board. This is our first Micro:bit tutorial. Also, we hope to present in the future how to use more than 40 sensors with this board. For that, I have used the Keyestudio Micro:bit starter kit. In this project, we will learn how to blink an LED bulb step by step. I believe this series is super important for beginners in programming. However, anyone can easily use the Micro:bit for their projects. It’s particularly great for young folks aged 8 and up, across all school grades.

What is Micro:bit?

The Micro:bit is a nonprofit educational organization that operates on open-source principles. It was designed by the BBC (British Broadcasting Corporation) in the United Kingdom, mainly to help children learn about digital technology The board is primarily based on ARM Cortex microcontrollers, offering extensive features compared to other development boards It’s essentially a pocket-sized computer equipped with an LED matrix display, buttons, sensors, speaker, microphone, Bluetooth, MicroUSB port, output pins, and input pins. With all these features, we can create fantastic projects using this board. Also, there are two versions of the Micro:bit available in the market. Now let’s see the specifications of these boards.

Micro:bit V1

  • Processor — Nordic nRF51822 – 16 MHz 32-bit ARM Cortex-M0 microcontroller
  • Flash Memory — 256 KB flash memory
  • RAM — 16 KB static RAM
  • Bluetooth — Bluetooth 4.0
  • Radio Communication — 2.4GHz Micro:bit Radio (80 channels)
  • Dimensions — 51.60mm x 42.00mm x 11.65mm (W x H x D)
  • Programming Languages — C++, MakeCode, Python, Scratch
  • 25 LEDs in a 5×5 array
  • MMA8652 – 3-axis accelerometer sensor
  • MAG3110 – 3-axis magnetometer sensor
  • On-board temperature sensor
  • MicroUSB connector
  • battery connector
  • 25-pin edge connector
  • Release on 10 February 2016
What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Micro:bit V2

  • Processor — Nordic nRF52833 – 64 MHz 32-bit ARM Cortex-M4 microcontroller
  • Flash Memory — 512 KB flash memory
  • RAM — 128 KB static RAM
  • Bluetooth —  Bluetooth 5.1 with Bluetooth Low Energy(BLE)
  • Radio Communication — 2.4GHz Micro:bit Radio (80 channels)
  • Dimensions — 51.60mm x 42.00mm x 11.65mm (W x H x D)
  • Programming Languages — C++, MakeCode, Python, Scratch
  • Integrated temperature sensor
  • Either ST LSM303 or NXP FXOS8700 – 3-axis  accelerometer and magnetometer sensor
  • MEMS microphone with a built-in LED indicator.
  • Onboard JIANGSU HUANENG MLT-8530 Speaker (up to 80dB)
  • MicroUSB connector
  • battery connector,
  • 25-pin edge connector.
  • 25 LEDs in a 5×5 array
  • Touch-sensitive logo
  • Release on 13 October 2020
What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Structure of Micro:bit board

If you want more info about Micro:bit, please use this link. Also, we can program this board using the IDEs below.

  • Microsoft MakeCodeIt is a code block-based and very simple IDE. I have used it for this tutorial. In this IDE we can also create codes using Python and Java scripts. But don’t worry as these codes are automatically generated with the code block.
  • Python Editor With this editor, we can create codes using the Micropython language. This is the most important programming language for AI.
  • Scratch — We can create programs using code blocks and it is very easy. It was introduced to programming for ages 8 and up.
  • Swift Playgrounds — We can make code using Swift language with this editor. For that, you need an Apple iPad or Mac computer.

These are the main coding playgrounds for Micro:bit. You can choose it as you like. I have used Microsoft MakeCode for this tutorial. It is very simple and anyone can understand it easily. Also, we need an additional shield to get inputs and outputs with this board. I used the keyestudio sensor shield for that. If the input and output pins are not used, no additional components are required.

What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Ok, let’s do this example project step by step. The required components are given below.

Step 1

Firstly, unbox this kit and identify the one-by-one components.

Step 2

Secondly, connect the Micro:bit board to the sensor shield.

Step 3

Thirdly, connect the Red LED module to the Shield. For that, use the circuit diagram below.

What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Step 4

Now, connect this board to the computer using a Micro USB cable. Then let’s make the program for this project. For that, follow the instructions below.

  • First, go to the MakeCode website and create a new project. You can name it as you like.
  • MakeCode — Click on me
  • Now you can see the MakeCode interface. It’s very simple and you can make any code using blocks.
  • I have paste the “Show String” block on the “On start” block. Then, paste two “digital write pin” blocks and two “pause” blocks on the “forever” block. You can change the LED pause time as you like.
  • Otherwise, you can paste the following code on the Python editor. Then, you can see the auto-generated code blocks.
  • Code and circuit diagram — Download
basic.show_string("Hello!")

def on_forever():
    pins.digital_write_pin(DigitalPin.P0, 1)
    basic.pause(500)
    pins.digital_write_pin(DigitalPin.P0, 0)
    basic.pause(500)
basic.forever(on_forever)
  • Also, you can see automatically generated Python and JavaScript codes.

Step 5

Next, click the Connect device button at the bottom of this site. In this case, you have to plug the Micro:bit board to the computer. Then, click the next button. Now you can see your Micro:bit name. After, click the connect button.

Step 6

Finally, click the Download button. Now you can see the scrolling text and LED blinking process. The full video guide is below. So, we hope to see you in the next project. Have a good day.

What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

What is the Micro:bit and how to blink an LED bulb using the Micro:bit board

Similar Posts

Leave a Reply

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