Expected output:
A fully functional 2D cellular automata 'game' run on an LED matrix, with individual lights acting as binary cells, and with users being able to interact by inputting a starting setup/generation of lit cells.
Algorithm/steps to achieve this:
Get LED matrix working and lighting up in general
Make sure input/output can be passed through the arduino to the matrix
Research how to code for a matrix like this
Create set of automata rules for the game
Apply rules to the matrix through arduino IDE program
Address user input problem, and decide on approach
Continue to improve and troubleshoot
Resources:
Have: LED matrix, power supply, BlueFruit arduino, wires and alligator clips from Fimbel
Need: power cord, additional wires/components?
Sketch of circuit:
I played around with a lot of different ideas for how the user could interact with the automaton. I wanted to use the arduino buttons to let them cycle through and chose a starting generation to run the automaton on- but what should those look like?
My original idea was complete randomization, but it wasn't interesting enough.
Then I tried out mathematical patterns. Below is what a binary "mod 3, wrapped in rows of 16" creates.
I did a lot of work making small programs in C++ to test out what I could do with the matrix before I settled on my final idea (a looping color states automaton).
My main programs for figuring out the matrix and Arduino IDE throughout this project were called matrix_gradient, matrix_random1, and matrix_random2.
matrix_random2 was an extension of the first program, which produced a randomized binary grid, and it produced a randomized color grid (based on a number of allowed input colors) instead. This eventually became the final code file.
{code links will be inserted here once in github}
I also used p5.js for figuring out some automata. I didn't want to have to put together the entire matrix circuit every time I wanted to test code, so based on some example code I looked at online, I wrote a program to draw square cells/pixels in an array that I could apply automata rules to, just like the LEDs.