Datasheet

You may need to reload your code or restart your board after changing the attached item because the capacitive touch
code "calibrates" based on what it sees when it first starts up. So if you get too many touch responses or not enough,
reload your code through the serial console or eject the board and tap the reset button!
Find the Pin(s)
Your board may have more touch capable pins beyond A0. We've included a list below that helps you find A0 (or A1 in
the case of CPX) for this example, identified by the magenta arrow. This list also includes information about any other
pins that work for touch on each board!
To use the other pins, simply change the number in A0 to the pin you want to use. For example, if you want to use A3
instead, your code would start with touch_pad = board.A3 .
If you would like to use more than one pin at the same time, your code may look like the following. If needed, you can
modify this code to include pins that work for your board.
# CircuitPython Demo - Cap Touch Multiple Pins
# Example does NOT work with Trinket M0!
import time
import board
import touchio
touch_A1 = touchio.TouchIn(board.A1) # Not a touch pin on Trinket M0!
touch_A2 = touchio.TouchIn(board.A2) # Not a touch pin on Trinket M0!
while True:
if touch_A1.value:
print("Touched A1!")
if touch_A2.value:
print("Touched A2!")
time.sleep(0.05)
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-
circuitpython
Page 125 of 199