Conway's Game of Life for the BBC Micro:Bit V2.
Ethan Dibble
January 2026
rustup target add thumbv7em-none-eabihf
rustup component add llvm-tools
cargo install cargo-binutils
cargo install --locked probe-rs-tools
cargo embed
-
Start with a random board.
-
Pressing the A button will re-randomize the board.
-
Pressing the B button will invert the board and then B button will be ignored for 5 frames.
This option is not very interesting as the cells often die off immediately due to overpopulation.
-
If the board is empty, the sim waits 5 frames, and if no button is pressed, the board is randomized.
- Compiling with
--feature slowwill run the game at 1 frame per second instead of the normal 10 frames per second.
Button presses are polled every frame, which works fine since counters are measured in frames. And the 100ms frame rate is not too fast for polling. You have to push the buttons on this board pretty hard though.
There are two counters: the B button and reset counters. Both are measured in frames, but are set and decremented under different conditions. Pressing the B button will set the associated counter and it will decrement every frame. Pressing any button will set the reset counter and it will decrement when the board is empty. These counters simply amount to additional match guards that check if they are zero.
Each step of Life happens at the start of the game loop before input is handled then displayed. Otherwise, pressing the B button will most often appear to only turn every cell off due to overpopulation. Handling input after running a step of Life lets you at least see the inverted board for a frame.
This project is licensed under the MIT License.