Introduction: Ping Pong in Arduino, With MAX7219

Picture of Ping Pong in Arduino, With MAX7219

Let's build the classic game of ping pong with arduino and with a 8*8 LED Matrix controlled by MAX7219.

It is necessary to have LedControl.h library. The code is compact as compared to other codes available in the internet. I hope you guys can enjoy making this fun creation!!

Step 1: Materials Required:

Picture of Materials Required:

1. Arduino Uno or any other Arduino Boards

2. 4 Buttons

3. 4 1k or 220 ohms resistor (just needs some resistance, I used 1k)

4. Jumper wires

5.Breadboard

6.8*8 LED matrix controlled by MAX 7219

Step 2: Buttons, Wiring and Final Connections

Picture of Buttons, Wiring and Final Connections

1. Place the buttons in a two player formation.

2. Connect the +ive rails with 5v and the -ive rails to the Gnd

3. Follow the figures above for wiring the buttons to gnd and 5v.

4. Connect the first button to pin 2, 2nd button to pin 3, 3rd button to pin4, and 4th button to pin .

5. Connect the DATA pin of MAX7219 to 12, CLK to 11, and CS to 10.

6.Place the MAX7219 LED matrix as shown.

PLEASE CLICK THE IMAGES TO ENLARGE AND CHECK THE NOTES.

Step 3: Coding

Paste the code given below.

LedControl.h library below (incase you don't have it)

Step 4: Have Fun

Picture of Have Fun

Now your ping pong game is ready to use.

Have fun enjoy with your friends.

To start playing, Press the first button, i.e. , the first player's left button.

Comments

Raebel Christo (author)2016-08-08

Thanks

DIY Hacks and How Tos (author)2016-08-07

Fun basic DIY video game. Projects like these are a great way to introduce the art of programming to people.

About This Instructable

1,298views

12favorites

License:

More by Raebel Christo:Arduino Minecraft AkinatorArduino Thermometer V2.0Arduino Thermometer V1.0
Add instructable to: