Skip to content

Instantly share code, notes, and snippets.

@pdbartsch
Created December 30, 2018 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdbartsch/c01440f60d5d9c24917bc1820cd3b664 to your computer and use it in GitHub Desktop.
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…
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)
@pdbartsch
Copy link
Author

Oops. Had my wires crossed. ArduinoUno17#5303 on Discord helped me out. Just had to switch my positive and negative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment