Skip to content

๐ŸŽฎโš™ The video game pong running on an arduino and displaying on an oscilloscope.

Notifications You must be signed in to change notification settings

yami2200/pong-arduino-oscilloscope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Pong Game on Oscilloscope

๐Ÿ“ข What is it about ?

It's a school project which was made on an arduino Uno. The idea was to play a video game displayed on an oscilloscope screen. We decide to make the original Pong, which was also designed on an oscilloscope at first.

Pong Game Demo GIF

Here is a demo video.

๐Ÿ“ How it works ?

We are using an Arduino Uno. First, we sets the PWM clock to its maximum value on Arduino. Then, we use pin 5 & 6 to write signals which represent X & Y axis. On oscilloscope, we just use XY Mode to display our signals. We just need first to filter our axis signals in order to have lines between points (because of the capacitor). Then, we just need to design all objects coordinates for the game. For the end, we developp a simple game as Pong.

We used 2 joysticks for the players, and a LCD screen to print the score & the time left for the game.

๐Ÿ“‹ How to play on your arduino & oscilloscope ?

๐Ÿ“Œ 1 ) Electronic Layout :

In order to test the project, you will need all this stuff :

  • an Arduino Uno
  • an oscilloscope
  • 2 capacitors of 100 nF
  • 2 resistors of 4.7 kฮฉ (it works with 1kฮฉ or 10kฮฉ but the visuals are not so clean)
  • cables
  • 2 joysticks
  • a LCD Screen (optional)

Then, you can create your electronic assembly by following this layout :

Pong Game Demo GIF

Note : Don't forget to plug the ground pin from Arduino to the oscilloscope.

๐Ÿ“Ÿ 2 ) Oscilloscope Settings :

  • You need to be in XY display Mode.
  • The screen will take 2V in height & 2V in width, so if you have 10 subdivisions on screen like us, take 200mV per subdivision.
  • The screen sample interval must be 5ms.
  • You will also need a -1V screen offset in X & Y to center the game visuals.

๐ŸŽฎ 3 ) Test the game :

Get the code, and upload it on the arduino. The game will start. Once a game is finished, you can restart another one by putting the two joysticks in down position.

The SEGMENT "VARIABLE CONFIGURATION" in code, can be edited if you want to change some settings of the game.

About

๐ŸŽฎโš™ The video game pong running on an arduino and displaying on an oscilloscope.

Resources

Stars

Watchers

Forks

Languages