What it does
We created a 10x8 LED matrix based on the Arduino platform. Multiplexing was utilized to cut down the number of pins required to only 18, one for each of the columns and rows on the matrix. Wiring was custom cut, as well as the LEDs, to create an aesthetic finish to the board and also increase visibility of the LEDs when used. Two buttons were added to the project in order to control a simple game, given the name of Pang. The object of the game is to catch falling coins by moving the LED in the bottom row with the buttons to be under a falling "coin" simulated in the remaining nine rows above. The beginning of the game flashes P-A-N-G in four separate screens, and at the end of the game the user's score is displayed on the board.
Challenges we ran into
The biggest challenge we ran into was with the algorithm to light up more than one LED at a time. With the circuit design used, anytime two LEDs are lit up, the opposite side LEDs also must be lit up. This creates a problem where the only designs that can be displayed are mirror images across the main diagonal of the matrix. It was found that by using very precise timing the LEDs could be lit up individually, but flashed fast enough that a human eye cannot tell that they are actually on one at a time. This meant if three LEDs were lit up, they were each on for only 1/3 of the time but they blink so fast it isn't noticed.
The new method worked well for smaller designs, but with 80 LEDs if all of them were to be on it would take much too long to flash all of them, and it would begin to be noticeable. This was solved by transitioning from individual LEDs lighting up to having each row light up in sequence. It used the same principle of flashing each row's LEDs on for a certain amount of the total time very quickly, but now only had to flash ten times instead of eighty. This greatly reduced the time between flashes, which made the LEDs appear completely on with no aliasing or ghosting on the board.
Accomplishments that we're proud of
The initial wiring was done with simple breadboard jumper wires, but the final board includes custom cut cabling as shown in the pictures above. It was a very time consuming process in a time-limited hackathon, but was well worth the effort to get the cleaner look.
The algorithms used to control the matrix were also much improved as time progressed. The initial algorithm was a very brute force method to displaying patterns, which was slowly improved to be more efficient and smart in order to display the patterns quicker and also to be less resource intensive.
What's next for Pang
During the original hackathon we got the LED board working with a game of Pang. After the hackathon work didn't stop, and so far the game Pong has been written for the board, and an Arduino library has been created which allows easy interfacing with the LED matrix.