Conway’s game of life on arduino

2,869 views

Published on

Project with Arduino Mega and 3 led boards.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,869
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Conway’s game of life on arduino

  1. 1. Conway’s game of life on Arduino<br />A 48x32 led matrix controlled by an Arduino able to project output from arbitrary sources (e.g. game of life)<br />
  2. 2. Goal<br />To make a led matrix on which Conway’s game of life can run<br />And enable it to display other stuff, like<br />Ticker tape<br />Clock<br />Temperature<br />Menu navigation?<br />
  3. 3. Conway’s game of life<br />World is a grid(x, y)<br />Each cell is alive or dead<br />Each iteration for each cell = grid(x, y):<br />If cell is alive,<br />It dies from loneliness if it has < 3 alive neighbors<br />It dies from food shortage if it has > 4 alive neighbors<br />It stays alive if it has 3 alive neighbors<br />If cell is dead,<br />It reincarnates if it has exactly 3 alive neighbors<br />
  4. 4. Setup<br />Arduino<br />3 Led matrices (3 x 4x2(8x8), incl 2 controllers)<br />Breadboard<br />Wires, some resistors, leds and buttons<br />For fun<br />Thermometer<br />Clock<br />
  5. 5. Arduino specs<br />
  6. 6. ARDUINO SPECS<br />Microcontroller: ATmega2560<br />Flash memory: 256 kB<br />(of which 8 kB is used by bootloader)<br />SRAM: 8 kB<br />EEPROM: 4 kB<br />Clock speed: 16 MHz<br />
  7. 7. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  8. 8. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  9. 9. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  10. 10. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  11. 11. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  12. 12. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  13. 13. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  14. 14. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  15. 15. Arduino specs<br />54 digital input/output pins<br />16 analog inputs<br />4 UARTs (hardware serial ports)<br />16 MHz crystal oscillator<br />USB connection<br />ICSP header<br />Reset button<br />
  16. 16. Wiring the system<br />Solder?<br />
  17. 17. Wiring the system<br />Solder?<br />
  18. 18. Wiring the system<br />Breadboard!<br />
  19. 19. Wiring the system<br />Breadboard!<br />
  20. 20. Wiring the system<br />Breadboard!<br />
  21. 21. Buttons<br />Initialize game of life world<br />
  22. 22. Buttons<br />Initialize game of life world<br />
  23. 23. LED boards<br />
  24. 24. LED boards<br />?<br />
  25. 25. LED boards<br />No memory on controller board<br />Consequence: fast refresh rate needed<br />External power supply (5V)<br />16 pin connector<br />
  26. 26. LED BOARDS<br />
  27. 27. LED BOARDS<br />
  28. 28. LED BOARD PROTOCOL<br />Serial data transfer<br />Devided into 2 halves (UDAT, LDAT)<br />Clock and A[2..0] to control the leds<br />No state-memory<br />
  29. 29. LED BOARD PROTOCOL<br />
  30. 30. LED BOARD PROTOCOL example<br />Psuedo-code for controlling the LED-board<br />
  31. 31. THERMOMETER<br />Component: DS1820<br />
  32. 32. Clock (RTC)<br />Solder time!<br />
  33. 33. Programming arduino<br />Download SDK from Arduino website.<br />Based on Processing SDK<br />Write program:<br />void Setup() {}<br />void Loop() {}<br />Upload to Arduino (USB) and run<br />Monitor by serial data transfer (USB)<br />
  34. 34. Programming arduino<br />Problem #1:<br />Memory too small to hold 2xLED matrix array representationAND a 3x5 font map<br />Problem #2:<br />Arduinotoo slow to fluently display Game of Life<br />
  35. 35. DEMO<br />
  36. 36. More info<br />Conway’s Game of Life<br />http://www.edesign.nl/2010/04/22/the-game-of-office-decoration/<br />Arduino Mega<br />http://arduino.cc/en/Main/ArduinoBoardMega2560<br />

×