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
#21
i have relays on an esp8266 they click once when its booted too.
so i guess that's just the way it is .
Reply
#22
i found this..

https://raspberrypi.stackexchange.com/qu...up-on-boot
Reply
#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
#24
(2017-05-24, 01:07 PM)Littlechay Wrote: Thanks good idea to put it in a script; which I had thought about but not got around to.

I have done it now. Works every time from the command line but nothing happens when triggered from an action.

Permissions are set on the script. I put it on the same path as you have done.. nothing.

The trigger is working OK just nothing from this action. Anything different from default in your system that may be affecting things?

Hello,
for the MOB button, see the discussion at https://www.hisse-et-oh.com/forums/comme...-a-opencpn
it uses a button connected to an input gpio and a bash script using xdotool to put the mob point in OpenCpn and an alarm!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)