Tuesday, October 18, 2022
HomeElectronicsRecreating Pong with an LED matrix

Recreating Pong with an LED matrix


Recreating Pong with an LED matrix

Arduino WorkforceOctober 18th, 2022

Tennis for Two is among the very first video video games in historical past. It will definitely impressed Atari’s Pong, which itself spawned many derivatives. Tennis for Two outputted vector graphics to an oscilloscope and had an elevation view of the “tennis courtroom,” full with gravity. Pong had pixel-based raster graphics with a less complicated top-view. That labored higher at low resolutions and with extra fundamental physics algorithms, which is why exposedwire selected it for this LED Pong challenge.

This digital sport performs like Atari’s Pong, however with an LED matrix sport display screen as a substitute of raster graphics. There are solely two controls: a pair of rotary encoders to manage the 2 participant paddles. These sit in a easy and engaging 3D-printed enclosure. Nonetheless, there isn’t any scoreboard. That implies that gamers should observe the rating themselves.

An Arduino Nano board controls the 16×8 grid of LEDs. That could be a whole of 128, which is excess of the variety of I/O pins out there on the Nano (22). A matrix setup reduces the variety of required pins all the way down to a minimal of 23 for 128 LEDs, although adhering to the 16×8 grid construction simplifies wiring and requires 24 pins. That’s nonetheless greater than is out there on a Nano, so this challenge makes use of three shift registers: one for the eight optimistic rows and two for the 16 detrimental columns. 

With that {hardware}, programming the sport logic in a sketch was a matter of transferring the ball in line with a easy algorithm and monitoring the LED states in a two-dimensional array. Only a few video video games are coded this fashion immediately, however this can be a nice demonstration of early methods that have been widespread for less-powerful {hardware}. 

You possibly can observe any responses to this entry by the RSS 2.0 feed.
You possibly can go away a response, or trackback from your individual website.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments