Capacitive Touch Pong Game

Aluminum foil is a low-cost and effective material you can use to create a capacitive touch sensor. This project shows you how to build and program a capacitive touch sensor circuit with an OLED color display to play the Blockly version of the game Pong. This program will work by calibrating a range of R/C time decay values the foil produces, then uploading the calibration into the main project. Let's jump in!

 

Build It

The Pong game consists of two separate programs. The first being a calibration program to scale and constrict the R/C time values that the foils produce, and the second being the main game code. Note that the size of the aluminum foil squares can vary and work well up to around 12” x 12” as long as both are equal in size.

Parts List

Included in the FLiP Try-it Kit (#32023):

Not included in the FLiP Try-it Kit:

Pin Connections

  • P0 - P4: OLED display module
  • P13 - P15: 10 MΩ resistors and alligator clips

 

Circuits

Build the circuits shown below, following the wiring diagram and schematics. Each alligator clip attaches to one foil sensor.

Double check to make sure the OLED display is wired correctly, and the aluminum foil sensors are not overlapping but are directly adjacent to each other.

Wiring diagram for the FLiP and breadboard connections.

Schematic for the foil sensor circuits.Schematic for the OLED sensor circuit.