text.skipToContent text.skipToNavigation

Game Of Life

Download Project Resources View on Github


Looking for a new conversation starter in your home? Build our Game of Life wall thermostat using new XC4390 addressable RGB light strip. The display uses the nice bright colors from the strip to show off the temperature and the interesting patterns of Conway's Game of Life.


Bill of Materials

In addition to all this below, we have also got a small photo frame from our local officeworks. The lighting strip will give us atleast 100 LEDs, which is 10x10, spaced at around 17mm away from each other, meaning you'll need about a 170x170 mm hole to mount into.

Qty Code Description
1 XC4390 Strip Lighting ( 120 LEDs )
1 XC4520 Temperature and Humidity Sensor
1 XC4431 Leonardo Tiny 32u4
1 WH3032 Solid Core Wire

You might also want

  • USB power cable and wall adaptor such as (WC7724) and (MP3455)
  • RTC Module (XC4450) to show the time
  • XC4444 Motion detection module to come to life when someone walks past
  • XC3742 Gesture sensor to set up games and interactivity

Patterns enabled:

  • Temperature setting, with colour gradient based on temperature.
  • Rainbow game of life

Source code

Library Author Version
Adafruit NeoPixel Adafruit 1.6.0
Adafruit NeoMatrix Adafruit 1.1.5
SDHT Helder Rodrigues 2.0.0

This repository contains the code for the 32u4 mini. It uses both the Adafruit NeoPixel and NeoMatrix libraries, ironically enough using the matrix to display the temperature and the neopixel strip to manage the game of life; It also then uses a small timer check in the main loop to switch between displaying the game and displaying the temperature.

Game of life is just implemented with a 100 element 8bit array that is bitshifted between each state. A neat idea could be to use some of the bits to

How to build

Building the matrix

The matrix is probably the biggest part of the build and so we'll cover it first. You'll need:

  • a Knife
  • Side cutters or scissors. (or can use knife again).
  • a 170mm x 170mm square backing cardboard or acrylic to mount the LED lights onto.
  • a bit of patience.

The strip is made up of 120 RGB LEDs which can be individially cut across the terminals as shown below

LED Terminals

The connection protocol is simple for this, as they are just "neopixel" like devices, each LED has a DATA IN and DATA OUT which chain together to form the length of striplighting.

led how

The data flows from the arduino through the LED lights like such: ( this will be helpful if you find that only some of your matrix is lighting up; you'll know exactly where the solder connection is.) The arduino will send all of the data to the first LED, which will interpret what you want in the lighting patterns before passing on the rest of the data to the remaining LEDs in series.

led data

For our purposes, we will zig-zag the strips so that they make a square shape.

led matrix

As we have 120 of them, the largest square we can acheive is 10x10, so we will cut them into strips of 10 LEDs that can then be connected together in a zig-zag pattern; 10 rows big.


It might be easier to solder the connections while you have the strips out like this, which you can do by first sliding a knife under the waterproofing rubber and then snipping it with a pair of sidecutters or scissors. you can also try and cut more with a knife if you're careful.



Then solder as per the diagram above, matching VCC to VCC and GND to GND, with DOUT going to DIN of the next strip. It also helps to first put a big blob of solder on each of the pads.


After you have done a few of the zig-zag chain, it's important to connect up all of the links together, which not only makes it stronger but it also helps the power get to the places where it needs to go throughout each strip.


After doing a few, it can look a bit rough if you rush it, but most of this will be contained behind the photo frame anyway.

one row

As we want them to look even, we'll try and space them out when placing them down on the backing. Each strip is about 6.5mm away from each other edge-to-edge, to the total of 17mm from one LED light to the next.

spacing out

Here we luckily had some square shaped glass that fit it perfectly. You could also use acrylic HM9509 and cut it down to size; the length of one 10-LED strip is around 170mm, so you would want a 170x170mm square piece of acrylic to mount the LED's on to. Each segment of the strip should have some adheasive backing that you can stick down.


Connection Module
D9 DHT sensor wire (yellow)
D11 first LED Data In, Green lead
+ (vcc) VCC on DHT, RED lead on LEDs
- [] (gnd) GND on DHT, White lead on LEDs

wire connections

Programming the software

Install the libraries that were specified above in the Source Code section and use the micro USB to connect your XC4431 Leonardo tiny to the computer. you should be able to select "Arduino Leonardo" as the board to program and choose the port to program. If everything is wired up correctly and the code is uploaded correctly, it should start working immediately.

How to improve

There's a few changes that could be done to this project. One we were thinking of was doing 3 seperate game of life's, for the Red, Green and Blue. This could produce some trippy effects and would invole minimal changes to the gameoflife.h file.

To make improvements:

  1. Star this respository at the top of the github repository page.
  2. 'Fork' this repository into your own account.
  3. Make changes to your local github copy by Cloning your version, commit-ing changes, and pushing to your github account
  4. open a pull request to merge your changed version of the project with our master version

We'll review the changes and merge them in if they help make the project great! plus your name will be included into a contributors list.