กลับไปหน้ารวมไฟล์
game-of-life-en.md

Artificial Life: Conway's Game of Life

Conway's Game of Life is not a game you "play"—it's a zero-player simulation. Based on the work of mathematician John Conway, it demonstrates how complex, organic-looking behavior can emerge from a few simple logical rules.

stock_counter_lcd_setup_1772706693516.png

The Rules of Life

In this simulation, a grid of pixels ("cells") evolves over generations:

  1. Survival: A live cell with 2 or 3 neighbors survives.
  2. Death: A live cell with too few or too many neighbors dies.
  3. Birth: A dead cell with exactly 3 neighbors becomes alive.

Hardware Setup

While you can run this on a 16x2 LCD, it looks best on a 0.96" I2C OLED display. The higher resolution (128x64) allows you to see interesting "creatures" like Gliders, Pulsars, and Gosper Glider Guns as they move across the screen.

  • Arduino Uno/Nano: To process the logic.
  • 0.96" OLED Display: To visualize the grid.
  • Push Button: To randomize the board and start a new "simulation."

Coding Challenge

This project is a great exercise in Memory Management. An Arduino Nano only has 2KB of SRAM. To store a 64x64 grid of cells, you need to use bit-manipulation (storing 8 cells in a single byte) to fit the whole "universe" into the Arduino's limited memory.

ข้อมูล Frontmatter ดั้งเดิม

title: "Conway's Game of Life on Arduino"
description: "Simulate life itself! Watch complex patterns emerge from simple rules as you run the world-famous cellular automaton on an Arduino and OLED screen."
category: "Science & Simulation"
difficulty: "Advanced"