Who doesn't want to play the retro games! It brings back old happy memories to people, where the pixel density wasn't that much as we have today, but we had games to play in those. In the era of modern high-end processor and graphics card, these games are considered to be the classics of gaming industry.
What is SnakePedia:SnakePedia is nothing but our all time favorite snake game. It is built on a custom made 8*8 LED dot-matrix display, where micro-controller ATmega328P is used as display and movement controller. The LED dot-matrix row, column operations are supervised with shift register 74hc595. This way we will be using less wires to light up the dot matrix.Also, I have soldered 4 push buttons with the micro-controller which are used to maneuver the snake. It is powered from external 5 volts supply.
Building the Dot Matrix and Primary Test:The LED Dot-Matrix:
There can be numerous schematics can be found from which a 8*8 LED dot matrix can be built. The schematic I used:
Connecting with Shift Register:
We have only 13 digital pins in Arduino Uno, but to light up the dot matrix total 16 pins need to be connected. For this, multiplexing technique will be used. To implement multiplexing technique, I will use shift registers. Shift registers are widely used for serial to parallel data conversion. I will be using 74hc595 shift register. 74hc595 shift register can connect to 8 lines in parallel. It has data, latch and clock pins for control. So I need 2 shift registers. One for row pins, another for column pins. And I am going to short the connections of data, clock and latch in both shift register. The schematic diagram is going to be:
MatrixBlink TestCode with Arduino:
Simulation onTest Code:
Dot Matrix Build CompletionandTesting:
Congratulations!! Now the matrix is ready and tested. Let's get to controller board where we will have micro-controller and buttons attached.
Controller Board Building:Here is the circuit diagram that connects push buttons and matrix to the Arduino.
Controller Board Circuit Diagram:
CircuitConnection on VeroBoard:
VCC and GND of the controller board is connected with Arduino Uno
Conclusion:Hopefully this tutorial can show the process of making 8*8 dot matrix display which involves 64 LEDs with shift register for multiplexing.
So,Let's Grab the tools and make a snake game with our Arduino!!
Comments