Build & Control Your Own Bluetooth Robot

A complete robotics platform for micro:bit with obstacle avoidance, custom motor control, and intuitive iOS/watchOS control.

micro:bit v2·iOS 18.1+·MIT License

iOS & watchOS Control App

Professional-grade mobile control with comprehensive features

  • 6-directional joystick with dedicated spin controls. Support for left-handed and right-handed layouts.
  • Monitor CPU temperature, battery level, distance sensors, and environmental data with color-coded gauges.
  • Companion app for quick robot control and basic telemetry monitoring on your wrist.

iOS 18.1+ · watchOS 11.1+ · Xcode 18+

Getting Started

1

Flash the Firmware

  1. Visit makecode.microbit.org
  2. Click ImportImport URL
  3. Paste:
    https://github.com/swiftwirt/microbee
  4. Click Go to import
  5. Connect your micro:bit and download
2

Assemble the Hardware

  1. Connect motors to driver module
  2. Wire motor driver to micro:bit pins
  3. Mount ultrasonic sensors (front & back)
  4. Connect sensors to designated pins
  5. Install micro:bit on chassis
  6. Connect battery pack
3

Install the Control App

  1. Use any Bluetooth UART terminal app
  2. Or download the microbee iOS app from the App Store
  3. Enable Bluetooth permissions
  4. Launch app and scan for devices
4

Connect & Control

  1. Power on your robot
  2. Open your Bluetooth control app
  3. Select your robot from the list
  4. Wait for connection confirmation
  5. Send commands to control movement
  6. Monitor status on LED matrix

Technical Reference

Hardware Requirements

Required Components

  • micro:bit v2
  • 2x DC Motors with wheels
  • Motor driver (L298N or similar)
  • 2x HC-SR04 Ultrasonic sensors
  • Robot chassis
  • Battery pack

Pin Configuration

Component Pin Function
Left Motor Forward P12 PWM Output
Left Motor Backward P13 PWM Output
Right Motor Forward P14 PWM Output
Right Motor Backward P15 PWM Output
Front Sonar Trigger P16 Digital Output
Front Sonar Echo P8 Digital Input
Back Sonar Trigger P2 Digital Output
Back Sonar Echo P1 Digital Input

Control Commands

Simple Numeric Commands

Cmd Action
1 Forward
2 Backward
3 Spin Left
4 Spin Right
5 Turn Left
6 Turn Right
7 Turn Left Back
8 Turn Right Back
0 Stop

JSON Control

{"l": 512, "r": 768}
  • l Left motor (0-1023)
  • r Right motor (0-1023)

Status Indicators

❤️ Connected
💀 Disconnected
⬇️ Forward
⬆️ Backward
⬅️ Spin Left
➡️ Spin Right
Obstacle
😊 Ready