This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create action from switch attached to GPIO
#23
The solution now implemented is a little different form your suggestions, and maybe even less work.

I have added the following line to my: /boot/config.txt

Quote:dtoverlay=gpio-shutdown,gpio_pin=21

See also: https://www.raspberrypi.org/forums/viewt...p?t=201483
and: https://raspberrypi.stackexchange.com/qu...ect=1&lq=1
As someone else described, GPIO pin 3 did not work for me either (2015 model 3 RPi).

When I now press the button the RPi does a shutdown. I did not want to do it via software, because then I rely on the WiFi, and sometimes my iPhone does not find the openplotter network anymore (any my GPS then also drops out on the other RPi with the chartplotter on it). So I guess this is a more reliable and direct way to do it.
After the shutdown I can safely flip the switch on my main panel.
Reply


Messages In This Thread
RE: Create action from switch attached to GPIO - by vriezenaar - 2018-07-17, 07:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)