DIY Arduino 1D Pong Game With WS2812 Led Strip

by mircemk in Circuits > Arduino

842 Views, 6 Favorites, 0 Comments

DIY Arduino 1D Pong Game With WS2812 Led Strip

DSCN3215.JPG

In this project it is presented 1-dimensional version of the classic game ‘Pong’ made with NeoPixel LED strip.

Description

DIY Arduino 1D Pong game with WS2812 Led strip

The game is for 2 players , in which the ‘ball’ the travels down the length of the LED strip, and will bounce back if the button is pressed when few end LEDs are illuminated.

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

This project was sponsored by NextPCB:

-Free PCB Design Analysis Software-NextDFM:

https://www.nextpcb.com/nextdfm.html

-Come to win a $20000 coupon:

https://www.nextpcb.com/Christmas-gift-month?code=...

-Register for $10 coupon & Free PCB boards:

https://www.nextpcb.com?code=Mirko

-15%OFF - PCB & 10 % SMT Orders:

https://www.nextpcb.com/pcb-assembly-services?code...

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The speed of the ball is changed after every hit, making it more difficult to hit the ball in time.
Device is very simple and easy to make and contains the following components:

- Arduino Nano microcontroller

- WS2812 Led strip with 60 leds

- 4 buttons

- Buzzer

- Transistor

- and two resistors

Building, Schematic and Code

onedpong_1.png
DSCN3162.JPG
DSCN3169.JPG
DSCN3170.JPG
DSCN3171.JPG
DSCN3174.JPG
DSCN3175.JPG
Untitled Sketch_bb.jpg

Unlike simple hardware, software is more complex and is taken from vagrearg.org web. Many parameters can be easily changed in the code, such as: Number of pixels in strip, Bounce-back zone size, Led dots intensity, Points needed to win etc ...

The game is made interesting with several features. Firstly, the ball will become faster and faster for every time it is hit back and forth. Secondly, the ball can be hit back within a blue "zone" and will be returned faster the longer into the zone you let the ball come. This is, of course, at the risk of hitting too late. Thirdly, you can boost the return by holding the boost-button down while hitting. The cost of a boost is reduction of your hit-back zone. Finally, all the parts are placed in a suitable box made of PVC plate and coated with self-adhesive colored wallpaper, so that the device got a functional and interesting look.

Downloads