A neural network designed to run on a BBC Microbit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mossy d7b0cd53cb Added license 7 months ago
LICENSE Added license 7 months ago
README.md updated README 8 months ago
neuralnetwork.hex updated file names 8 months ago
neuralnetwork.py updated file names 8 months ago


BBC Microbit Neural Network

A neural network designed to run on a BBC Microbit

Neural Network Task

The neural network is fed 4 sets of 5 numbers, either a 0 or a 1. These numbers are represented by on or off lights on the first 4 rows of the Microbit's display. Whilst learning, the Microbit processes each set of numbers and returns a number between 0 and 1. This number should be the first number in the set, and the neural network will hopefully pick that up during it's learning phase. The Microbit runs 1000 learning itterations before being fed a new set of 5 numbers, represented by the lights on the bottom row of the Microbit's display and printing it's output in scrolling text on the display. This should be as close to the status of the first light in the set as possible.


  • Go to the Microbit's online python editor and load either neuralnetwork.py or neuralnetwork.hex, then save the code to your Microbit
  • Once the Microbit's code has been saved to it and it is powered on, hold the A button to generate a random data set. You should aim to have 2 out of the 4 first rows start with an on light, and 2 of them start with an off light in order to have varied training data
  • Once you are happy with your data set, press the B button to begin training. The status of it's training phase is represented by a loading bar of pixels which will fill up the screen once it has finished training
  • Obsereve the output of the testing data as it scrolls across the screen

Video Demonstration