This is an old revision of the document!
Author: Mihai-Alexandru Mares
Group: 1221A
Faculty: FILS
The game is played on a grid made of LEDs. At the start of the game, some LEDs will blink, indicating the positions of the exit, the key and the mines. The player's job will be to navigate through the grid, collect the key and reach the exit without hitting any bombs.
The goal of this project was to get myself used to programming an Arduino microcontroller and also to learn how to solder.
List of components:
Schematic for how the LED matrix is wired together:
This specific configuration allows the control of the entire matrix using only 7 output pins.
I've also built a digital replica of this project on TinkerCad accessible at the link below:
https://www.tinkercad.com/things/fZJAAXsfZli-swanky-snaget/editel?sharecode=0bbuIXbi3h2ZAVldh3UEmUbhqDcp3eWFfsQdjW7n0CM
The code was written in Sublime Text 3 and compiled/uploaded to the Adruino using Arduino IDE
The main loop of the game is:
I used the “Charlieplexing” algorithm to control which specific LED lights up. It works by setting the 2 output pins corresponding to the desired LED to OUTPUT (one to HIGH and one to LOW) and all the other ones to INPUT. https://en.wikipedia.org/wiki/Charlieplexing
Below are a couple images showing the results. Each of the hanging cables are connected to the Arduino board when the project is assembled.
This project has been a great learning experience and very interesting to do despite the fact that I didn't get to implement all of the features I initially planned for it.
In the archive below are the .ino file containing the code used for this project as well as the images above. mares_mihai_1221a_pmproject.rar