I was wondering if utilizing the code below would be sufficient in shutting down and restarting a Raspberry Pi 3 A+ with the use of a TTP223 capacitive touch sensor. By default, the touch sensor is outputting high and when touched, outputs logic low. Since it outputs high, I figured using "gpio_pull=off" would be appropriate.



That should work, assuming your touch sensor is connected to the default gpio_pin=3. Note that even if you disable the internal pull resistors, there are still external 1.8k pullup resistors for I²C on GPIO pins 2 and 3 (schematic), but they won't come close to exceeding the output current of your TTP223.

  • Ah yeah, I figured gpio_pull=off would be pointless with that pin. For safety, I am trying a new code as follows: dtoverlay=gpio-shutdown,gpio_pin=4,active_low=1,gpio_pull=off
    – Guysho
    Aug 27 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.