code.py
 1  # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  """
 6  CircuitPython Capacitive Touch Pad Example - Print to the serial console when one pad is touched.
 7  """
 8  import time
 9  import board
10  import touchio
11  
12  touch = touchio.TouchIn(board.TOUCH1)
13  
14  while True:
15      if touch.value:
16          print("Pad touched!")
17      time.sleep(0.1)