Created
November 24, 2019 21:54
-
-
Save Ferenc-/81d17ec6760e08b330177205dccc5ad5 to your computer and use it in GitHub Desktop.
TTP223 demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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