Differences

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

Link to this comparison view

pm:prj2022:agmocanu:nine_men_s_morris [2022/05/11 20:17]
luca.muntean [Descriere generală]
pm:prj2022:agmocanu:nine_men_s_morris [2022/05/27 22:39] (current)
luca.muntean [Bibliografie/Resurse]
Line 15: Line 15:
 {{pm:​prj2022:​agmocanu:​Muntean_Luca_project.png?​ 400}} {{pm:​prj2022:​agmocanu:​Muntean_Luca_project.png?​ 400}}
  
-The game receives an input from the two joysticks and buttons which is processed by the Arduino UNO Micontroller and displays the information on the LCD which serves as the devices ​output.+The game receives an input from the two joysticks and buttons which is processed by the Arduino UNO Micontroller and displays the information on the LCD (which serves as the game board) which actively modifies its output ​accordingly.
    
- 
-<note tip> 
-O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează. 
- 
-Exemplu de schemă bloc: http://​www.robs-projects.com/​mp3proj/​newplayer.html 
-</​note>​ 
  
 ===== Hardware Design ===== ===== Hardware Design =====
  
-<note tip> +List of required Pieces
-Aici puneţi tot ce ţine de hardware design+  * 1 Arduino UNO Microcontroller 
-  * listă de piese +  * 2 Joysticks 
-  * scheme electrice (se pot lua şi de pe Internet şi din datasheet-uri,​ e.g. http://​www.captain.at/​electronic-atmega16-mmc-schematic.png) +  * 2 Buttons 
-  * diagrame de semnal ​ +  * 1 LCD 
-  * rezultatele simulării + 
-</​note>​+{{pm:​prj2022:​agmocanu:​Muntean_Luca_sketch.jpg?​ 400}} 
 +{{pm:​prj2022:​agmocanu:​Luca_schem.jpg?​ 400}}
  
 ===== Software Design ===== ===== Software Design =====
 +{{:​pm:​prj2022:​agmocanu:​muntean_luca_code.zip|Source Code}}
 +
 +Git: https://​github.com/​luca1911/​MA_code_muntean_luca/​blob/​main/​sketch_may23a.ino
 +
 +Developed in Arduino IDE
 +
 +External libraries used: SPI.h and TFT.h
 +Both libraries are used to simplify the process of drawing shapes on the display.
 +
 +Code functionality:​
 +
 +The code is based on a matrix that works as the board for the game, each piece (white and black) is assigned a number which is placed in the matrix.
 +
 +I used 4 functions to move around the board to the adjacent square in each of the 4 directions(up,​ down, left, right)
 +
 +There s also a function that checks if a mill was formed (3 pieces of same color have been placed in a row)
 +
 +Two types of turn functions are used depending on the state in which the game is(if all 9 pieces have been placed on the board), both of them use the 4 movement functions which are controlled by the joystick to select a square to place the piece in. once the button is pressed and the piece is placed the mill check function is immedietly called to verify if the piece you just placed formed a mill in which case the "​Remove"​ method is called to navigate to one of the opponents pieces and remove it by pressing the button. The first type of turn works by placing all of your 9 pieces on the board, while in the second one, you have to move your already placed pieces to adjacent squares. If one player only has 3 pieces remaining on the board, they will be allowed to move their pieces to any empty square(not only ajacent).
 +The game ends when one player loses by only having 2 pieces left. The game method is the main method that controls which type of turn will be played next.
 +
 +
 +
 + 
  
  
-<note tip> 
-Descrierea codului aplicaţiei (firmware): 
-  * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) 
-  * librării şi surse 3rd-party (e.g. Procyon AVRlib) 
-  * algoritmi şi structuri pe care plănuiţi să le implementaţi 
-  * (etapa 3) surse şi funcţii implementate 
-</​note>​ 
  
 ===== Rezultate Obţinute ===== ===== Rezultate Obţinute =====
 +{{pm:​prj2022:​agmocanu:​luca_pic.jpg?​ 400}}
 +
 +Demo Video: https://​youtu.be/​NkT_JMXXI0Y
 +
 +
  
-<note tip> 
-Care au fost rezultatele obţinute în urma realizării proiectului vostru. 
-</​note>​ 
  
 ===== Concluzii ===== ===== Concluzii =====
 +I actually enjoyed working on this project more than I initially thought I would and managed to build this little game device of which i am really proud of.
 +
 +By working on this project i managed to also get the skills necessary to use an lcd display and joystick and combine that with my knowledge from the lab in order to complete the project
 +
  
-===== Download ===== 
  
-<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ă ;-). 
  
-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>​ 
  
-===== Jurnal ===== 
  
-<note tip> 
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. 
-</​note>​ 
  
 ===== Bibliografie/​Resurse ===== ===== Bibliografie/​Resurse =====
 +https://​en.wikipedia.org/​wiki/​Nine_men%27s_morris
 +
 +https://​exploreembedded.com/​wiki/​Analog_JoyStick_with_Arduino
 +
 +https://​create.arduino.cc/​projecthub/​electropeak/​ultimate-beginner-s-guide-to-run-tft-lcd-displays-by-arduino-081006
 +
 +Fritzing ​
 +
 +
  
-<​note>​ 
-Listă cu documente, datasheet-uri,​ resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**. 
-</​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/prj2022/agmocanu/nine_men_s_morris.1652289472.txt.gz · Last modified: 2022/05/11 20:17 by luca.muntean
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