Micro Bit
The BBC micro:bit is a pocket-sized, open-source programmable computer designed to foster digital creativity and coding skills among children and young people aged 8 and older.[1] Introduced in 2015 as part of the BBC's Make It Digital campaign, it aims to inspire a new generation of innovators by providing hands-on access to computing concepts, much like its predecessor, the BBC Micro from the 1980s.[2] The device measures approximately 4 cm by 5 cm and features a 5x5 LED matrix display, two programmable buttons, an accelerometer, a magnetometer (compass), a temperature sensor, a microphone and speaker (in version 2), Bluetooth and radio connectivity for wireless communication, and GPIO pins for interfacing with external components.[3] Developed in collaboration with partners including ARM, Microsoft, and the Raspberry Pi Foundation, the micro:bit supports programming in block-based languages like Microsoft MakeCode, as well as text-based options such as Python and JavaScript, enabling users to create interactive projects ranging from simple games to environmental sensors.[2] Initially distributed free to one million secondary school students in the UK, it has since evolved with the release of version 2 in 2020, adding enhanced audio capabilities and a touch-sensitive logo.[3] Today, the non-profit Micro:bit Educational Foundation oversees its global promotion, providing free resources, curricula, and tools that have reached over 66 million learners in more than 85 countries, emphasizing inclusive education in computer science, electronics, and physical computing.[4]Hardware
Version 1
The original micro:bit Version 1, released in 2016, is a compact single-board computer designed for educational programming and prototyping, measuring 43 mm × 52 mm and featuring an edge connector that makes it pin-compatible with standard breadboards for easy integration into circuits.[5] Its open hardware design includes publicly available Gerber files, enabling custom manufacturing and modifications by the community.[6] The board was produced through partnerships with electronics distributors Farnell and RS Components, who handled initial large-scale manufacturing and global distribution.[7] Version 1 has several hardware revisions; early boards (v1.0–v1.2) feature separate accelerometer and magnetometer chips, while later ones (v1.3 and v1.5) use a combined chip for both functions.[8] At the core of Version 1 is the Nordic nRF51822 system-on-chip, which integrates an ARM Cortex-M0 processor running at 16 MHz, 256 KB of flash memory for program storage, and 16 KB of RAM for runtime operations.[9] This processor supports low-power modes to extend battery life, making it suitable for portable projects. The board includes a 5×5 LED matrix display composed of 25 individually addressable red LEDs, capable of showing simple animations, text scrolling, or status indicators, alongside two programmable buttons labeled A and B for user input.[3] A 3-axis accelerometer (NXP MMA8653 in early versions or ST LSM303AGR in later versions) detects motion, tilt, and shake gestures, enabling applications like gesture-controlled games.[10] Version 1 incorporates additional sensors and connectivity options for expanded functionality. An integrated magnetometer (NXP MAG3110 in early versions or ST LSM303AGR in later versions) provides compass-like direction sensing by measuring magnetic fields.[9] A temperature sensor embedded in the nRF51822 processor reports ambient conditions with reasonable accuracy for basic environmental monitoring. Connectivity features Bluetooth Low Energy (BLE) 4.0 for wireless communication with smartphones or other devices, alongside a 2.4 GHz radio for peer-to-peer networking between multiple micro:bits. The board exposes 20 general-purpose input/output (GPIO) pins via the edge connector, supporting protocols such as I²C, SPI, and UART for interfacing with external sensors, actuators, or displays. Power is supplied through a micro-USB port for direct connection to computers or chargers, or via a 2-3V coin cell battery (such as CR2032) using an onboard JST connector, with USB providing up to 120 mA and battery operation optimized for low-power sleep modes to achieve extended runtime.[9] Unlike Version 2, which added audio input and output capabilities, Version 1 focuses on core sensing and wireless features without built-in sound processing hardware.[3]Version 2
The BBC micro:bit Version 2, released in 2020, maintains the same compact physical dimensions of 43 mm × 52 mm as its predecessor to ensure backward compatibility with existing accessories, cases, and edge connector-based projects. This form factor preserves the device's portability while accommodating significant internal upgrades for enhanced performance and functionality. The board also supports backward compatibility with Version 1 software, allowing seamless transition for users and educators without requiring code modifications.[11] At the core of Version 2 is an upgraded processor: the Nordic Semiconductor nRF52833, featuring an ARM Cortex-M4F CPU running at 64 MHz, with 512 KB of flash memory and 128 KB of RAM. This represents a substantial improvement over earlier models in processing speed and memory capacity, enabling more complex computations and multitasking, such as real-time data processing from multiple sensors. The increased resources support advanced applications like basic AI and machine learning tasks directly on the device.[11][12] The display and input mechanisms retain the iconic 5×5 LED matrix (25 individually addressable red LEDs) for visual output and the two programmable buttons (A and B) for user interaction, ensuring familiarity for ongoing projects. A key addition is a capacitive touch sensor integrated into the gold BBC logo on the front, which enables gesture-based inputs such as tap detection, expanding creative possibilities for touch-sensitive applications without additional hardware.[3][11] Sensors and connectivity see targeted enhancements while preserving core elements. The three-axis accelerometer and magnetometer from previous versions are retained for motion and compass functionality, using the LSM303AGR chip for reliable detection across multiple gravity ranges (2/4/8/16g). New additions include a built-in microphone (Knowles SPU0410LR5H-QB-7) for sound level detection and environmental audio monitoring, complete with a dedicated LED indicator for activity. A PCB-mounted piezoelectric speaker provides audio output capabilities, delivering up to 80 dB at resonance for simple sound generation and music playback. Connectivity upgrades feature Bluetooth Low Energy 5.1 via the nRF52833's integrated radio, supporting longer range and improved data rates over the 2.4 GHz band, alongside the micro:bit's proprietary radio protocol for device-to-device communication. The USB interface has been refined with a yellow LED indicator to signal activity and connection status, simplifying troubleshooting during programming and power-up.[11][13][14] Power management has been optimized with enhanced sleep modes, including deep sleep and off states that disable non-essential components to achieve significantly longer battery life—up to several times that of Version 1 in low-activity scenarios—while a red LED on the back indicates power status for quick visual confirmation. These modes, coordinated between the main nRF52833 MCU and the auxiliary NXP KL27 interface MCU, minimize consumption during idle periods or when powered by external batteries via the JST connector.[15][3] Overall design improvements emphasize audio integration for sound processing tasks, such as noise level analysis or voice-reactive projects, facilitated by the new microphone and speaker. The yellow USB activity LED aids in user-friendly operation, and the hardware remains fully open-source, with updated schematics and reference designs available for community customization and manufacturing. Additional ergonomic tweaks, like a bumpy bottom edge for better handling and indented GPIO pins for secure connections, enhance practical use in educational settings.[3][16]Software
Programming languages
The micro:bit supports multiple programming languages, designed to accommodate users from novices to experienced developers, with a focus on accessibility for educational purposes. Primary support includes block-based and text-based options that leverage the device's hardware through abstraction layers, while additional languages enable more advanced or low-level control.[17] Block-based coding is facilitated by Microsoft MakeCode, a visual programming environment where users drag and drop blocks to build programs, which are then compiled into either JavaScript or MicroPython code for execution on the micro:bit. This approach is particularly suited for beginners, as it emphasizes logical flow without requiring syntax knowledge, and supports extensions for features like Bluetooth communication and radio broadcasting between devices.[18] Among text-based languages, MicroPython provides an official, lightweight port of Python 3 optimized for the micro:bit's microcontroller, the Nordic nRF51822 (version 1) or nRF52833 (version 2), including themicrobit module for hardware interaction.[19] This module offers device-specific libraries for components such as the LED matrix and sensors; for instance, scrolling text on the display can be achieved with from microbit import display; display.[scroll](/page/Scroll)("Hello"). MicroPython is ideal for scripting simple applications like sensor data logging or animations, balancing ease of use with direct hardware access. Version 2's expanded hardware, such as the microphone and speaker, is fully supported in MicroPython releases from 2020 onward.[20][21][22]
JavaScript is supported as a text-based option through the Espruino interpreter, a JavaScript engine ported to the micro:bit that enables runtime execution of scripts without full compilation. Programs written in JavaScript can access hardware via Espruino's API, such as controlling pins or the display, and are often exported from MakeCode for deployment; this makes it suitable for interactive projects like games or event-driven responses.[23][24][25]
For lower-level programming, C/C++ is available via the ARM mbed OS, which integrates with the micro:bit's Device Abstraction Layer (DAL) to provide a C/C++ API for precise control over peripherals like GPIO, I2C, and SPI. This is commonly used for performance-critical applications, with code compiled to hexadecimal (.hex) files using the mbed toolchain. Experimental support exists for other languages, including Rust through community-driven crates that target the micro:bit's ARM Cortex-M0 processor, and Lua via embedded ports like eLua, though these require custom builds and are not officially maintained.[26][27][28][29]
Regardless of the language, programs are typically deployed as .hex files flashed over USB or Bluetooth Low Energy (BLE), with interpreted environments like MicroPython and Espruino incurring some runtime overhead due to the device's constrained 16 KB RAM (in Version 1) or 128 KB (in Version 2), necessitating efficient code to avoid memory exhaustion. The DAL ensures consistent hardware access across languages, promoting portability while abstracting low-level details.[30][31]