This repository is part of Snake Game Arcade (S.G.A) project development from subjects PCS3635 - "Laboratório Digital I" (1.0 release) and PCS3645 - "Laboratório Digital 2" (latest version), wich are subjects from POLI-USP that aim at developing F.P.G.A projects, integrating with different software/firmware components.
It contains the code of the interface that shows the game screens.
Members of the group:
- Erick Diogo de Almeida Sousa
- Carlos Maria Engler Pinto
- João Pedro Bassetti Freitas
Teacher
- Edson Toshimi Midorikawa
Main dependencies:
- Poetry
- Python 3.10 or higher
Your Python version needes to be at least 3.10 in order to use statements such as match - case. Prefferebly use pyenv, the repo has a .python-version for that.
This project uses poetry for dependency management. Follow the steps below in order to install and use all the dependencies:
- Install
poetryon your machine if you still don't have it withpipor preffereblypipx. Follow the docs - Clone the project
- At root, run
poetry shellin order to start the virtual environment - Run
poetry installto install the dependencies. All of them are listed atpyproject.toml - Run the files manually with
python
Flash your FPGA board with the main project's .qar, available at this repo.
Connect your FPGA board to the computer, utilizing a serial port to USB converter.
In the file interface/snake-game.py, at the very beggining of the main function, you should change the serial port to the right port. In order to do so, follow the steps below.
Your port will be /dev/ttyUSB0.
Before plugging in the USB cable, open device manager.
Then, plug the USB cable and see what COM port corresponds to it, for example, COM5.
Run interface/snake-game.py file.