Need help with the code from this tutorial

I think this code will do exactly what I need for a project (at least to start) but I'm pretty new to this type of code and I'm struggling to understand exactly where to paste this and how to define the pin number.

There's no void setup or void loop so I'm guessing this code isn't complete?

Any help greatly appreciated.

Paste it in the beginning of a new sketch (before anything else).

You can define a pin number as usual. And next call it in e.g. loop like

// that other code here

// pin definitions
const byte somePin = 4;

void setup()

void loop()
  byte cycles = readCapacitivePin(somePin);

That will give you the idea; not tested and no experience with the playground code (just glanced over it).