OpenMarine

Full Version: Create action from switch attached to GPIO
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
i have relays on an esp8266 they click once when its booted too.
so i guess that's just the way it is .
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.
(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!
Pages: 1 2 3