Arduino based Bi-color LED Matrix Pong Game

We have created two game project instructables so far using the jolliFactory Bi-color LED Matrix Driver Module D.I.Y kits we designed. This LED Matrix module is designed to be chain-able so you may daisy-chain the modules together to the number of modules you need to suit your project.

We have created two game project instructables so far using the jolliFactory Bi-color LED Matrix Driver Module D.I.Y kits we designed. This LED Matrix module is designed to be chain-able so you may daisy-chain the modules together to the number of modules you need to suit your project.  You may check out these two game project instructables with the links below:  Project to build a 2 LED Matrix tall Tetris game can be found at https://www.instructables.com/id/Arduino-based-Bi-color-LED-Matrix-Tetris-Game/   Project to build a 2 LED Matrix tall Snake game can be found at https://www.instructables.com/id/Arduino-based-Bi-color-LED-Matrix-Snake-Game/  Pong is one of the first computer games ever created. We came across a couple of Pong game projects built using potentiometers to control the paddles. Potentiometer is not expensive, easy to work with and thus is a great choice as an input device for Pong game projects.  We have a few of these interesting Rotary Encoder - Illuminated (Red/Green) purchased from Sparkfun lying around for quite a while. As of writing this instructable, this part is available from Sparkfun (Part number: COM-10596) for U$2.95. You may check this part out at https://www.sparkfun.com/products/10596  For this instructable, we will be building yet another Pong game using two of the Bi-color LED Matrix Driver Modules daisy chained together driven by an Arduino Nano. Here, we will be using the Rotary Encoder - Illuminated (Red/Green) as the input device to control the game paddle.  Rotary Encoder is much more challenging to implement as an input device as compared to the humble potentiometer. However, we would like to experiment with something new here and hope that those who have not dabbled with rotary encoders before will learn more about them.  To build this project, basic electronics knowledge with electronics component soldering skill and some knowledge on using the Arduino are required.  You may view the following YouTube video to see what we are building.

You may check out these two game project instructables with the links below:

Project to build a 2 LED Matrix tall Tetris game can be found at https://www.instructables.com/id/Arduino-based-Bi-color-LED-Matrix-Tetris-Game/


Project to build a 2 LED Matrix tall Snake game can be found at https://www.instructables.com/id/Arduino-based-Bi-color-LED-Matrix-Snake-Game/

Pong is one of the first computer games ever created. We came across a couple of Pong game projects built using potentiometers to control the paddles. Potentiometer is not expensive, easy to work with and thus is a great choice as an input device for Pong game projects.

We have a few of these interesting Rotary Encoder – Illuminated (Red/Green) purchased from Sparkfun lying around for quite a while. As of writing this instructable, this part is available from Sparkfun (Part number: COM-10596) for U$2.95. You may check this part out at https://www.sparkfun.com/products/10596

For this instructable, we will be building yet another Pong game using two of the Bi-color LED Matrix Driver Modules daisy chained together driven by an Arduino Nano. Here, we will be using the Rotary Encoder – Illuminated (Red/Green) as the input device to control the game paddle.

Rotary Encoder is much more challenging to implement as an input device as compared to the humble potentiometer. However, we would like to experiment with something new here and hope that those who have not dabbled with rotary encoders before will learn more about them.

To build this project, basic electronics knowledge with electronics component soldering skill and some knowledge on using the Arduino are required.

You may view the following YouTube video to see what we are building.

Step 1: Overview of Rotary Encoder

Rotary encoder may look like a potentiometer but they are totally different components.

There are two main types of rotary encoders: absolute or incremental encoders.

Absolute Encoders output the rotational angle using an absolute code. The rotational position can be detected by reading the code.

Incremental Encoders output a pulse string according to the rotational displacement of an axis, and information such as speed, distance, and relative position could further be derived from it.

Overview of Rotary Encoder Arduino Based Bi-color LED Matrix Pong Game

The rotary encoder we will be using here is an electro-mechanical, incremental (24 pulses) component that has full shaft rotation which can turn infinitely with no end stops unlike potentiometers (some potentiometers do come with no end stops). It is especially cool because it has a red/green LED built in, as well as a push-button which can be activated by pressing on the rotating shaft end. It is designed to be a PCB through-hole component and not panel mountable or suitable for breadboard prototyping (unless you do not mind bending the pins apart and cut/bend the two mechanical side tabs).

The device has 7 pins – three on one side and four on the other. The side with three pins is for the encoder: signal A, ground (labelled as C), and signal B. The side with four pins is for the push-button, Red LED and Green LED.

The two encoder outputs A and B, are called quadrature outputs, as these output signals are 90 degrees out of phase.

Check out article at http://bildr.org/2012/08/rotary-encoder-arduino/ for detail on how we use these encoder outputs to manipulate the game’s paddle.

Step 2: Building the Arduino Bi-color LED Matrix Pong Game

We will be building a two LED Matrix long Pong game here driven by an Arduino Nano. This project uses two of the Bi-color (Red and Green) LED Matrix Driver Module kits from jolliFactory. Each of these modules uses two MAX7219 Display Driver ICs to drive a Bi-color LED Matrix. These ICs are excellent because they take a lot of work off the micro-controller and simplify the wiring and logic design.

You can find this Bi-color LED Matrix Driver Module kit from here

This kit comes with all through-hole components and someone with basic soldering skill should be able to assemble it without much difficulty.

For More Details: Arduino Based Bi-color LED Matrix Pong Game

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top