Extending the PiTFT (1601) power button functionality (rpi_p

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
skub
 
Posts: 39
Joined: Sun Mar 11, 2012 10:55 pm

Extending the PiTFT (1601) power button functionality (rpi_p

Post by skub »

I have the power button functionality working as described in the tutorial: https://learn.adafruit.com/adafruit-pit ... -pi/extras

Is there a way to extend the same functionality for the other 3 buttons? For instance, how would I go about implementing restart (shutdown -r) functionality for one of the other buttons?

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Extending the PiTFT (1601) power button functionality (r

Post by adafruit2 »

you can only have the power button on one GPIO - edit /etc/modprobe.d/adafruit.conf to change the line :)

User avatar
skub
 
Posts: 39
Joined: Sun Mar 11, 2012 10:55 pm

Re: Extending the PiTFT (1601) power button functionality (r

Post by skub »

Sorry, I guess that was ambiguous.

Forget the power button, we'll let that be as is - let's say I wanted to have one of the other buttons toggle the back light. Do I need to write/rewrite a kernel module to do that?

User avatar
oly086
 
Posts: 2
Joined: Sun Nov 15, 2015 8:32 am

Re: Extending the PiTFT (1601) power button functionality (r

Post by oly086 »

Hi, do you find any answer to your question about: Extending the PiTFT (1601) power button functionality (rpi_p?

I want to be able to execute additional script from GPIO 22 or 27 or 18 of the 1601 display of Adafruit. Search a lot on the net and find nothing...

Thank you

oly086

User avatar
skub
 
Posts: 39
Joined: Sun Mar 11, 2012 10:55 pm

Re: Extending the PiTFT (1601) power button functionality (r

Post by skub »

I never extended those other buttons. It's my understanding that you'd need to write a kernel module just like rpi_power_switch, but I don't know for sure. It would be nice to get an official answer...

User avatar
oly086
 
Posts: 2
Joined: Sun Nov 15, 2015 8:32 am

Re: Extending the PiTFT (1601) power button functionality (r

Post by oly086 »

Effectively. On m'y side I will be happy to program these 3 other buttons with gpio script.
May be it Will give ldea to new customer and Adafruit Will sell many more 1601 board.

Good product with good learning tutorial...

User avatar
skub
 
Posts: 39
Joined: Sun Mar 11, 2012 10:55 pm

Re: Extending the PiTFT (1601) power button functionality (r

Post by skub »

I've never written a linux kernel module, but if you need a tester, just reply here.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”