Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2023:tmiu:gameoflife [2023/05/28 22:43]
tea_eliza.tatoiu
pm:prj2023:tmiu:gameoflife [2023/05/30 18:32] (current)
tea_eliza.tatoiu [Concluzii]
Line 1: Line 1:
 ====== Conway'​s Game of Life ====== ====== Conway'​s Game of Life ======
-===== Introducere ​=====+===== Introduction ​=====
  
 <note tip> <note tip>
-Prezentarea pe scurt a proiectului vostru: +This project is a recreation of John Conway'​s game of life using Arduino, with LEDs representing the cells and their evolution displayed in real-time. ​ 
-  * ce face +  * The purpose of this project is entertainment and is inspired by an old game creating a physical representation of the cellular automaton for a more immersive and interactive experience.  
-  * care este scopul lui +  * The Game of Life serves as a fascinating example of a cellular automaton, showcasing emergent behavior from simple rules. It has been extensively studied by mathematicians and computer scientists to understand patterns, complexity, and the principles of self-organization in dynamic systems.
-  * care a fost ideea de la care aţi pornit +
-  * de ce credeţi că este util pentru alţii şi pentru voi +
-This project is a recreation of John Conway'​s game of life using Arduino, with LEDs representing the cells and their evolution displayed in real-time. The purpose of this project is entertainment and is inspired by an old game +
  
 </​note>​ </​note>​
-===== Descriere generală ​=====+===== Project Description ​=====
  
 <note tip> <note tip>
-O schemă bloc cu toate modulele proiectului vostruatât software cât şi hardware însoţită de o descriere ​acestora precum şi modului în care interacţionează. +The rules are simple: 
- +  * Each cell on a grid can be in one of two states: alive or dead. 
-Exemplu de schemă bloc: http://​www.robs-projects.com/​mp3proj/​newplayer.html+  * The state of each cell in the next generation is determined by its current state and the states of its eight neighboring cells. 
 +  * If a live cell has fewer than 2 alive neighbors, it dies (underpopulation) 
 +  * If live cell has more than 3 alive neighbors, it dies (overpopulation) 
 +  * If dead cell has exactly 3 alive neighbors, it becomes alive (reproduction) 
 +  * Live cells with 2 or 3 alive neighbors continue to live on the next generation
 </​note>​ </​note>​
  
Line 22: Line 23:
  
 <note tip> <note tip>
-Aici puneţi tot ce ţine de hardware design+Components
-  * listă de piese +  * Arduino Uno R3 
-  * scheme electrice (se pot lua şi de pe Internet şi din datasheet-uri,​ e.g. http://​www.captain.at/​electronic-atmega16-mmc-schematic.png) +  * MAX7219 LED Matrix 
-  * diagrame de semnal ​ +  * Wires 
-  * rezultatele simulării+  * Buttons 
 +  * Joystick 
 + 
 +{{:​pm:​prj2023:​tmiu:​schematic.jpg?​200|}} 
 + 
 </​note>​ </​note>​
  
Line 33: Line 39:
  
 <note tip> <note tip>
-Descrierea codului aplicaţiei ​(firmware): +  * I am using LedControl.h library 
-  * mediu de dezvoltare ​(if any) (e.g. AVR StudioCodeVisionAVR+  * Source code {{:​pm:​prj2023:​tmiu:​proiect_game_of_life_care_merge_final.zip|}} 
-  * librării şi surse 3rd-party ​(e.g. Procyon AVRlib+  * void randomize_cells(): gives a random configuration of cells, so the game has a starting point, or if you wanna change the cell configuration mid game; 
-  * algoritmi şi structuri pe care plănuiţi ​să le implementaţi +  * void countAliveNeighbors(int row, int col): counts the number of alive neighbors in the position world[row][col],​ diagonals also count; 
-  * (etapa 3surse şi funcţii implementate+  * void next_generation(): figures out the next generation based on the rules i mentioned above, and is using countAliveNeighbors(row,coland copies the new "​world"​(of cells) into the current one; 
 +  * void showOnLed(): shows on the physical LED, the configuration set on the integer matrix world[8][8] that is filled with ones and zeros 
 +  * For the joystick control part : if (joystickX != selectedCellX || joystickY != selectedCellY) - ensures that the selected cell state is updated only when the joystick position changes 
 +  *Inside the if condition, I updated the selectedCellX and selectedCellY variables using the map() function. This maps the joystick'​analog values (ranging from 0 to 1023) to the corresponding cell coordinates in the world array (ranging from 0 to SIZE-1). 
 +  *For changing the state of the selected cell upon joystick click, I added code to check if the joystick click button ​(JOYSTICK_CLICK_PINis pressed and the joystickClicked flag is false. If the conditions are met, the state of the selected cell is toggled by calculating the opposite state using (cellState + 1) % 2. The state of the selected cell in the world array is updated, and the LED at the selected cell position is set to the new state using lc.setLed(). The joystickClicked flag is then set to true.
 </​note>​ </​note>​
  
-===== Rezultate Obţinute ​=====+===== Obtained Results ​=====
  
 <note tip> <note tip>
-Care au fost rezultatele obţinute în urma realizării proiectului vostru.+{{:​pm:​prj2023:​tmiu:​whatsapp_image_2023-05-30_at_16.45.08.jpg?​200|}}
 </​note>​ </​note>​
  
 ===== Concluzii ===== ===== Concluzii =====
 +  * Apply what I learned in a practical way.
 +  * Improve problem-solving skills.
 +  * Develop presentation and documentation skills.
  
 ===== Download ===== ===== Download =====
  
 <note warning> <note warning>
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului:​ surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). +{{:pm:prj2023:tmiu:proiect_game_of_life_care_merge_final.zip|}}
- +
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:​pm:​prj20??:​c?​** sau **:​pm:​prj20??:​c?:​nume_student** (dacă este cazul). **Exemplu:​** Dumitru Alin, 331CC -> **:pm:prj2009:cc:dumitru_alin**.+
 </​note>​ </​note>​
  
Line 59: Line 70:
  
 <note tip> <note tip>
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului.+ 
 </​note>​ </​note>​
  
Line 65: Line 77:
  
 <​note>​ <​note>​
-Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**.+https://​www.instructables.com/​Arduino-based-Bi-color-LED-Matrix-Game-of-Life/​ 
 + 
 +https://​steemit.com/​utopian-io/​@pakganern/​how-to-control-8x8-led-matrix-using-joystick 
 + 
 +https://​forum.arduino.cc/​t/​help-with-8x8-led-matrix-and-max7219-code-conways-game-of-life-almost-done/​131738
 </​note>​ </​note>​
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
  
pm/prj2023/tmiu/gameoflife.1685303029.txt.gz · Last modified: 2023/05/28 22:43 by tea_eliza.tatoiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0