Skip to main content

Creating a PC 2 player pong game controller with Arduino and Processing

A few days ago, @jordibinefa noticed me about one very interesting instructables post that talks about arduinoprocessing and how to control your computer from it.

I tried it and it was soooo amazing that I want improve it and make a real 2 player ‘pong’ game.

First of all, read the original instructables post to understand what we are talking about.

We will use 2 potentiometers (one for each player). To wire it we will use the A0 and A1 analog pins of our Arduino.


Arduino 2 players analog controller
Arduino 2 players analog controller

We will load this code to the Arduino board:

And this modified code to Processing IDE using the original project from instructables as a base:

Full code here:

Notice that i’m using the Linux serial port /dev/ttyACM0 to communicate my laptop with Arduino, but you must change it to use your own serial device.

Now, you can play with this 2 players Pong game with scores and increasing difficulty level.

Leave a Reply

%d bloggers like this: