Building a Physical Microbit Neural Network

Scott Turner
3 min readJan 5, 2020

In this article we going to look at building a neural network using microbits with micropython. The figure above shows the arrangement of the connections; pin 2 is the output of each neuron, pins 0 and 1 act as inputs. The micro:bit images used in the figure were produced using the micro:bit Fritzing diagram available at https://github.com/microbit-foundation/dev-docs/issues/36 thanks to David Whale (@whalleygeek ) for this.

The two micro:bits/neurons on the left of the picture take in the two same inputs; the output from these neurons are the two inputs to the output neuron on the right. Looking at producing a network of neurons, ie. neural network using a three microbits; with each microbit acting as a neuron. To have an example we are looking to solve the problem, that a single neuron alone can’t solve, making an Exclusive OR gate (XOR)

First let us start without the microbits but building an entirely software-based Neural Network in Python first and then moving to the microbits

1 Overview and a non-microbit neuron

1.1 Overview:

The characteristics of the system will be:

  • Inputs are going to be binary
  • Weighted sum is bias+W1*input1+w2*input2
  • If weighted sum>=0 then…

--

--

Scott Turner

Director of Computing at Canterbury Christ Church University. Interests: Robots, VR, technology enhanced learning, public engagement of STEM