Skip to content

Instantly share code, notes, and snippets.

@Ferenc-
Created November 24, 2019 21:54
Show Gist options
  • Save Ferenc-/81d17ec6760e08b330177205dccc5ad5 to your computer and use it in GitHub Desktop.
Save Ferenc-/81d17ec6760e08b330177205dccc5ad5 to your computer and use it in GitHub Desktop.
TTP223 demo
#!/usr/bin/env python3
import board
import digitalio
led = digitalio.DigitalInOut(board.D4)
led.direction = digitalio.Direction.OUTPUT
touch_sensor = digitalio.DigitalInOut(board.D5)
touch_sensor.direction = digitalio.Direction.INPUT
while True:
led.value = touch_sensor.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment