Created
December 30, 2018 18:40
-
-
Save pdbartsch/c01440f60d5d9c24917bc1820cd3b664 to your computer and use it in GitHub Desktop.
Simple example to illustrate my problem using an Adafruit Hallowing with CircuitPython. When using the built in red led on pin 13, the light remains off until I ask it to turn on with the capacitive touch pad. When using an external led through any GPIO pin (including 13) my led is on by default and then blinks as expected when touching the touc…
This file contains hidden or 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
import board, digitalio, touchio, time | |
led = digitalio.DigitalInOut(board.D9) | |
#led = digitalio.DigitalInOut(board.D13) | |
led.direction = digitalio.Direction.OUTPUT | |
touch = touchio.TouchIn(board.TOUCH4) | |
while True: | |
if touch.value: | |
led.value = True | |
time.sleep(0.1) | |
led.value = False | |
time.sleep(0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oops. Had my wires crossed. ArduinoUno17#5303 on Discord helped me out. Just had to switch my positive and negative.