Two Player Ping Pong

This project sets up a ping-pong game on an 8x8 LED dot matrix display. The game
is designed to be played by 2 players who use pots to control the position of their “paddle”.

The video below shows a setup similar to the one described here:

Two Player Ping Pong

The video above shows ping pong being played with a “direct drive” LED matrix, which is
one where each of the 16 pins of the matrix must be connected directly to an I/O pin on the
Arduino microcontroller board.

This project uses a MAX7219 display driver IC instead of “direct drive” wiring. This
streamlines the both the connections and the code required to operate an LED matrix:

  1. With a MAX7219, only 5 connections are required to the Arduino; this contrasts with 16 needed for
    direct drive matrices. This doesn’t mean that less wiring is needed, because all 16 of the
    I/O lines from the LED matrix still have to be connected to the MAX7219, but it does mean that
    many of the I/O pins on the Arduino are freed for other purposes.

  2. The MAX7219 (and similar IC’s) can execute single commands that perform large-scale operations
    on the LED, e.g., clear all pixels, set all pixels on, set the values for a whole row or column
    at once.

  3. Several open source libraries for the MAX7219 make it easy to write compact, efficient sketches
    to drive several different types of LED matrix.

Interfacing Made Even Easier

For some LED matrices, vendors provide MAX7219’s on PC boards that interface directly to an
LED matrix. An example of such a board and its accompanying matrix is shown below.

In this case, it is not even necessary to wire the LED matrix to the MAX7219; that is all
done when you plug the matrix into the interface board. Then only 5 wires are needed to
connect the interface board to an Arduino. That is the type of device used for this packet.