I want to use the Bluefruit to run a cellular automata simulation by turning the Neopixels on and off depending on a set of rules.
I've been looking into the rules of Conway's Game of Life and came up with a related set for the 10 Neopixel cells. I plan to have them set up as a 2D automata, but in a circle - so cell 1 is a neighbor of both cells 2 and 10.
A summary of the rules:
A cell that is lit is 'on' or 'live'.
If a cell is off, it will stay off unless it has 2 live neighbors to 'populate' it.
If a cell is on, it will stay on (it is stable) as long as it has exactly one live neighbor. If it has 2 live neighbors, it will 'die' of 'overpopulation'. If it has no neighbors, it will 'die' of 'underpopulation'. (Similar to Game of Life rules).
My next step will be to write the Arduino program that will allow me to set the on/off status of each cell, retrieve that status and that of each of its neighbors, and update that status based on the encoded rule set. It can be framed as a very simple game: inputting a starting generation that lasts as long as possible, or finding a starting generation that stays stable (with these rules, do there exist still-life or oscillating patterns?)
Setup:
loop():
setupMode():
run():
renderLEDs():