Pins
Control currents in Pins for analog/digital signals, servos, i2c, …
Control currents in Pins for analog/digital signals, servos, i2c, …
All the bits and pieces that make up the BBC micro:bit
The red lights are LEDs (light emitting diodes) and form a 5 x 5 LED Screen. They can be set to on/off and the brightness can be controlled.
The yellow light on the back of the micro:bit is the status LED. It flashes yellow when the system wants to tell the user that something has happened.
See how the micro:bit shows numbers, text, and displays images by watching this video about LEDs:
Buttons A and B are a form of input. When you press a button, it completes an electrical circuit. The micro:bit can detect either of its two buttons being pressed/released and be programmed to act on these events.
Button R on the back of the micro:bit is a system button. It has different uses. When you have downloaded and run your code onto your micro:bit, press Button R to restart and run your program from the beginning.
Find out how buttons provide input to the micro:bit in this video:
When you plug in your micro:bit via USB, it should appear as a MICROBIT
drive.
If you accidentally hold down the reset button as you’re plugging in your micro:bit, the micro:bit will appear as a MAINTENANCE
drive instead of MICROBIT
. This is known as maintenance mode.
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as MICROBIT
.
The compass can detect magnetic fields such as the Earth’s magnetic field. As the micro:bit has this compass, it is possible to detect the direction it is moving in. The micro:bit can detect where it is facing and movement in degrees. This data can be used by the micro:bit in a program or be sent to another device.
There is an accelerometer on your micro:bit which detects changes in the micro:bit’s speed. It converts analogue information into digital form that can be used in micro:bit programs. Output is in milli-g. The device will also detect a small number of standard actions e.g. shake, tilt and free-fall.
Watch this video to learn how the accelerometer works:
The pins can be a form of electrical input or output. There are labels for the input/output pins P0
, P1
, P2
, which you can attach external sensors to such as thermometers or moisture detectors.
The screen can also be used a light level sensor (it’s a really cool trick).
Learn more about how light level is detected in this light sensor video:
Temperatrue is measured on the micro:bit by detecting how hot its physical CPU material is. Since it operates nearly as cool as the air around it, the temperature it measures for itself is a good approximation for the ambient temperature (the temperature near and around it).
See how the micro:bit can detect hot or cold in this temperature sensing video:
The micro:bit embodies many fundamental concepts in computer science. To learn more, read the micro:bit - a reactive system.
Sometimes, your micro:bit may display an error code. For more information, see:
Your micro:bit can be connected to your computer via a micro USB cable. Data can be sent and received between the micro:bit and the computer so programs can be downloaded from Windows, Macs and Chromebooks onto the micro:bit via this USB data connection. Click here to read more information on how to run scripts on your micro:bit, and click here to read more about the error messages you might get.
When your micro:bit is connected to your computer with the micro USB, it doesn’t need another power source.
When your micro:bit isn’t connected to your computer, tablet or mobile, you will need 2 x AAA 1.5 V batteries to power it.
The pins labelled 3V and GND are the power supply pins. You can attach an external device such as a motor to these and power it using the battery or USB.
The micro:bit can send and receive data via serial communication. The serial data can be transferred via USB, BLE or redirected to pins on the edge connector.
You will see the label BLE ANTENNA on the back of your micro:bit. It is for a messaging service, so that devices can talk to each other. The micro:bit is a peripheral device which can talk to a central device like a smart phone or tablet that has Bluetooth Low Energy (BLE). The micro:bit can send signals and receive signals from a central device so another BLE device can control the micro:bit or the micro:bit can control another BLE device.
The micro:bit pins
The micro:bit has 25 external connections on the edge connector of the board, which we refer to as ‘pins’. The edge connector is the grey area on the right side of the figure above.
There are five large pins, that are also connected to holes in the board labelled: 0, 1, 2, 3V, and GND. And along the same edge, there are 20 small pins that you can use when plugging the micro:bit into an edge connector.
You can easily attach crocodile clips or 4mm banana plugs to the five large pins.
The first three, labelled 0, 1 and 2 are flexible and can be used for many different things - which means they are often called ‘general purpose input and output’ (shortened to GPIO). These three pins also have the ability to read analogue voltages using something called an analogue-to-digital converter (ADC). They all have the same function:
The other two large pins (3V and GND) are very different!
power input: If the micro:bit is powered by USB or a battery, then you can use the 3V pin as a power output to power peripherals with.
If you hold the ‘GND’ pin with one hand, you can program the microbit to detect yourself touching the 0,1 or 2 pins with your other hand, giving you three more buttons to experiment with (you just used your body to complete an electrical circuit).
There are 20 small pins numbered sequentially from 3-22 (these pins are not labeled on the micro:bit, however, they are labelled in the picture above).
Unlike the three large pins that are dedicated to being used for external connections, some of the small pins are shared with other components on the micro:bit board. For example, pin 3 is shared with some of the LEDs on the screen of the micro:bit, so if you are using the screen to scroll messages, you can’t use this pin as well.