# Lesson 5: Capacitive Touch

In Lesson 5 in our CPX series, we will learn how to use capacitive touch sensing. This is a multi-part series starting with an introduction to capacitive sensing.

## Lesson 5.1: Intro to Capacitive Touch on the CPX

In this lesson, we will first introduce the concept of capacitive sensing before building a simple capacitive touch “piano.” We will then show how to visualize the raw capacitance values and capacitance touch threshold values, which are used to trigger capacitance events. Third, we cover how to use both auto-calibration and manual calibration to change the capacitance touch threshold before building a capacitive-responsive instrument (similar to Lesson 4: Light-Responsive Instrument).

### Lesson 5.1 Code

Here is a link to the programs we built in Lesson 5.1.

## Lesson 5.2: Capacitive Sensing with Everyday Objects

Building on 5.1, we will prototype an interactive piano out of everyday objects like an orange, banana, and soda can with the CPX, MakeCode, and capacitive touch sensing. We’ll again show how important it is to measure the capacitance touch values of different objects and to use auto-calibration or manual calibration to configure capacitance touch thresholds.

### Lesson 5.2 Code

Here is a link to the programs we built in Lesson 5.2.

## Lesson 5.3: Making a Capacitive Touch Keyboard

Building on 5.2, we’ll use capacitive touch sensing to make a custom keyboard and play music and video games with fruit, a coin, and a soda can. Essentially, we’re going to make your laptop think the CPX is a keyboard and have all sorts of fun using different objects as keys!

### Lesson 5.3 Code

Here is a link to the programs we built in Lesson 5.3.

## Lesson 5.4: Making a Lo-fi Capacitive Touch Nintendo Controller

Building on 5.3, we’ll use capacitive touch sensing to make a custom lo-fi Nintendo NES controller out of cardboard, copper tape, and tin foil and play Super Mario Bros.

### Lesson 5.4 Code

Here is a link to the programs we built in Lesson 5.4.