Home

Awesome

bbc-microbit-io

logo

Johnny-Five IO Plugin for the BBC micro:bit

Prerequisites

Getting Started

npm install bbc-microbit-io johnny-five

Boilerplate Program

var five = require('johnny-five');
var microbitio = require('bbc-microbit-io');

var board = new five.Board({
  io: new microbitio({
    // id: '<id of micro:bit>', // optional
    // address: '<address of microbit>' // optional
  })
});

board.on('ready', function() {
  // do Johnny-Five stuff
});

Examples

See examples folder as well as Johnny-Five examples.

API

See Johnny-Five API docs.

Pin Guide

Johnny-Five Compatible NameNumberSupported Modes
A00Input, Output, Analog, PWM
A11Input, Output, Analog, PWM
A22Input, Output, Analog, PWM
A33Input, Output, Analog, PWM
A44Input, Output, Analog, PWM
5Input, Output
6Input, Output
7Input, Output
8Input, Output
9Input, Output
A510Input, Output, Analog, PWM
11Input, Output
12Input, Output
13Input, Output
14Input, Output
15Input, Output
16Input, Output
17-
18-
19Input, Output
20Input, Output

micro:bit pinouts

Additional Features

TypeUsageJohnny-Five type
Accelerometernew microbitio.Accelerometer();five.Accelerometer
Buttonnew microbitio.Button('A'); or new microbitio.Button('B');five.Button
Compassnew microbitio.Compass();five.Compass
LED Matrixnew microbitio.LedMatrix();five.Led.Matrix
Thermometernew microbitio.Thermometer();five.Thermometer