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.
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.
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.
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.
Comments will be approved before showing up.