Free US Shipping on orders over $150 with discount code "FREESHIP" at checkout

How a Micro:Bit Works: Getting Started

September 02, 2020

How a Micro:Bit Works: Getting Started

A Micro:Bit is a small computer board that you can use as a basis for all sorts of electronics projects. You’re only bound by the limits of your imagination when using it, though you can also follow instructions via online tutorials to make your desired electronics in a simpler way. We’ll get you started with how a Micro:Bit works in this overview of the computer.

The Parts

Let’s take a look at your Micro:Bit and identify its components. To start with, you will see a grid of small LED lights arranged in a 5x5 formation in the center. These can light up in different ways based on your coding commands and can work as a sensor as well. The A and B buttons on the left and right are useful for using the Micro:Bit as a simple controller for games. At the bottom of the board, there are five holes edged with a cold coloration that are meant to act as the point at which you connect your Micro:Bit to other electronic parts.

On the left side of the back face, you can see the microcontroller, which directs the operation of the Mico:Bit as a whole (it contains the CPU and RAM) and acts as a temperature sensor. Below this are a compass (for direction) and accelerometer (to measure gravity). At the top, beginning from the left, there is a Bluetooth and radio communication component. To the right of this, you’ll see a USB port, a reset button (to wipe the Micro:Bit of its current code), and a battery port (to connect to a power source). Obtain a microUSB cable to connect your Micro:Bit to your computer and start coding it.

The Basics of MakeCode

There are two ways you can code your Micro:Bit. The first is via MakeCode, which uses the internet and presents code in the form of blocks that you can visually connect to one another. Different types of blocks appear in various colors, so you can easily distinguish between them. You can place certain blocks depicting the results you want within clamp-shaped blocks that name the command that will trigger those results.

For example, you might want your LED lights to all turn on when you press the A button on the Micro:Bit. You would drag onto the editor section a clamp-like block that is labeled, “on button A pressed”, with the “A” selectable in a dropdown menu on the block. Inside this block, you would then drag a second block that is labeled as “show LEDs” and which is comprised of an image of all the LEDs lighting up on the grid. These blocks are all found on the left menu.

The Basics of MicroPython

MicroPython requires a more traditional approach to coding. With it, you should use Mu—an editor interface that is simplified for beginners to utilize. In the Mu editor, you write out lines of code that direct the Micro:Bit. A basic command you could enter is print(‘text’) which will display the word or phrase you type in between the quotation marks in the REPL (Read Print Evaluate Loop) window that pops up at the bottom. In this case, it will say “text” there. As you code, the REPL window is useful for testing code. Another simple instruction you could write is display.show(‘text’). The text your place between the quotation marks will appear on the LEDs of the Micro:Bit.

Having read our “How a Micro:Bit Works: Getting Started” guide, you can proceed to purchase one of your own. For electronic hobby kits, including those for the Micro:Bit, visit the Chicago Electronic Distributors’ website. We supply all kinds of tools and parts you may need as you get into making electronics.




Leave a comment

Comments will be approved before showing up.


Also in News

Ways To Use Raspberry Pi in the Classroom
Ways To Use Raspberry Pi in the Classroom

September 21, 2020

Raspberry Pi computers are useful for teaching students about computers and electronics. Discover ways to use Raspberry Pi in the classroom here.

Continue Reading

How To Build a Robot Using Raspberry Pi
How To Build a Robot Using Raspberry Pi

August 28, 2020

Many people would like to make robots but don’t know where to start. In this guide, we go over how to build a robot using a Raspberry Pi so you can get started.

Continue Reading

How to Create a Raspberry Pi Python Program
How to Create a Raspberry Pi Python Program

August 13, 2020

Using a programming language allows you to make a computer carry out commands. Get an introduction to programming with Python on a Raspberry Pi here.

Continue Reading