Skip to content

Code for a both a WiPy and ATtiny85 to animate Conway's Game Of Life on a circular LED disc.

License

Notifications You must be signed in to change notification settings

gpshead/life_circle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

life_circle

MicroPython code for a WiPy to animate Conway's Game Of Life on a circular LED disc.

Usage

To use this on a WiPy wired up with a 5V logic level shifter on its SPI bus connected to the Adafruit LED disc with sufficient power to drive all 255 LEDs:

import life

disc = life.Life(brightness=8)
disc.run()

What it looks like

LIFE on a Circle - LED disc Animation

I have the LEDs above a few cm behind some wax paper to diffuse the light.

About this code

The apa102 module

The apa102 module is fairly generic and should be usable to control any number of APA102 / DotStar LEDs on your SPI bus. I have attached strands before and after the disc during my own testing. You may see some other fun test code in there.

The life module

The neighbor relationships for the LEDs when mapped to this circular LED disc will greatly impact your LIFE. I got lucky with this definition but perhaps you can do better. Of particular interest in this universe is that not all LEDs have the same number of neighbors. This is very much not your typical two dimensional grid...

The code has experimental torus support. I found things tended to die off rapidly in that configuration as it destroyed the natural ring 1 circle of life.

Hardware

TODO(gpshead) draw out how I have mine connected.

Parts list

  • A WiPy. Or likely anything capable of running MicroPython that exposes an SPI bus. I haven't tried anything else.
  • A 74AHCT125 or similar to act as a logic level shifter from 3V3 to 5V.
  • A 5V power supply sufficient to drive 255 LEDs. I'm using this 5V 10A supply. You could get away with less so long as you guarantee you never supply a high brightness value... But it is _A Bad Idea_™ to rely on software to prevent power supply damage.
  • A prototyping breadboard, wires and connectors.

About

Code for a both a WiPy and ATtiny85 to animate Conway's Game Of Life on a circular LED disc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published