touchio — Touch related IO

The touchio module contains classes to provide access to touch IO typically accelerated by hardware on the onboard microcontroller.

Libraries

All classes change hardware state and should be deinitialized when they are no longer needed if the program continues after use. To do so, either call deinit() or use a context manager. See Lifetime and ContextManagers for more info.

For example:

import touchio
from board import *

touch_pin = touchio.TouchIn(D6)
print(touch_pin.value)

This example will initialize the the device, and print the value.