Bit V2.2 Starter Kit
Overview
Bit V2.2 Starter Kit
Overview
Bit V2.2 Starter Kit provides an accessible and feature-rich platform for exploring the world of IoT, making it an excellent choice for both beginners and experienced developers.
Bit V2.2 is a small, wearable device that can be used to create a wide range of projects, from simple sensors and actuators to complex IoT applications. The board measures 43mm x 52mm and features a 25-pin edge connector, which allows easy connection to other devices and sensors. The starter kit includes the Micro | Bit board, a USB cable, a battery holder, and a quick-start guide. |
Key Features
Accelerometer (3-axis)
Compass (magnetometer)
Thermometer (temperature sensor)
Light sensor
Microphone
Functionality
43mm x 52mm
12g
2.4 GHz
100 mA (maximum)
Up to 10 days (typical)
-20C to 70C
Getting Started
Bit V2.2 Starter Kit, follow these steps |
BBC Micro:Bit V2.2 Starter Kit Documentation
Overview
The BBC Micro:Bit V2.2 Starter Kit is a compact, low-power microcontroller board designed for educational and prototyping purposes. It's a popular IoT component suitable for beginners and experienced developers alike. This documentation provides an overview of the board's features, technical specifications, and code examples to get you started with using the Micro:Bit V2.2 in various contexts.
Features and Technical Specifications
Microcontroller: Nordic nRF52833
Processor: 64MHz Arm Cortex-M4
Flash Memory: 512KB
RAM: 128KB
Bluetooth 5.0 Low Energy (BLE)
25 Programmable I/O Pins
5x5 LED Matrix Display
2-Button Interface
Micro-USB Interface
Battery Holder for AAA Batteries
Dimensions: 51.8 x 51.8 mm
Software and Programming
The Micro:Bit V2.2 can be programmed using various languages, including:
MicroPython
Scratch
C++
JavaScript (using the MakeCode editor)
For this documentation, we'll focus on MicroPython examples.
Code Examples
### Example 1: Blinking LEDs
This example demonstrates how to control the 5x5 LED matrix display on the Micro:Bit V2.2 using MicroPython.
```python
import microbit
while True:
microbit.display.set_pixel(2, 2, 9) # Set pixel at (2, 2) to brightness 9
microbit.sleep(500) # Wait 500ms
microbit.display.clear() # Clear the display
microbit.sleep(500) # Wait 500ms
```
This code sets a single pixel on the LED matrix to brightness 9, waits for 500ms, clears the display, and then waits again. This creates a blinking effect.
### Example 2: Button-Activated LED Control
This example shows how to use the two on-board buttons to control the LED matrix display.
```python
import microbit
while True:
if microbit.button_a.is_pressed():
microbit.display.show("A") # Show the letter "A" on the display
elif microbit.button_b.is_pressed():
microbit.display.show("B") # Show the letter "B" on the display
else:
microbit.display.clear() # Clear the display
microbit.sleep(50) # Wait 50ms
```
In this example, pressing button A displays the letter "A" on the LED matrix, while pressing button B displays the letter "B". When neither button is pressed, the display is cleared.
### Example 3: BLE Communication with a Mobile App
This example demonstrates how to use the Micro:Bit V2.2's BLE capabilities to communicate with a mobile app.
```python
import microbit
import bluetooth
# Initialize BLE
bluetooth.init()
# Advertise the Micro:Bit as a BLE peripheral
bluetooth.advertise(name="MicroBit_LE", service_uuid="12345678-1234-1234-1234-123456789012")
while True:
# Wait for a BLE connection
client = bluetooth.connect()
# Send a string to the connected device
client.send("Hello from Micro:Bit!")
# Wait for a response from the connected device
response = client.recv(20)
# Print the received response
microbit.display.scroll(response)
# Disconnect from the client
client.disconnect()
```
In this example, the Micro:Bit V2.2 is configured as a BLE peripheral, and it advertises its presence to nearby devices. When a connection is established, the Micro:Bit sends a string to the connected device and waits for a response. The received response is then displayed on the LED matrix.
These examples demonstrate the capabilities of the BBC Micro:Bit V2.2 Starter Kit and provide a starting point for more complex projects. With its ease of use, versatility, and low power consumption, the Micro:Bit V2.2 is an excellent choice for various IoT applications, from simple prototypes to more complex projects.