2017-05-20, 07:05 AM
How do I create an action from a switch attached to a GPIO
I have created the switch under GPIO as an input, pull down
the momentary contact switches are connected between a GPIO and ground. I have two.
One I eventually want to use to generate a MOB alarm and create a waypoint in OCPN..
The other I want to use to cancel alarms by clearing all messages and setting another GPIO to low.
Let's say I have a temperature sensor that triggers an alarm above a certain temperature. I have actions configured to display a message and set a GPIO output high which operates a relay that lights an illuminated push button switch.
The idea is that you press the illuminated button to clear the alarm from the display and turn off the light.
How do I set up an action that detects that the push button has been pushed?
Chris
I have created the switch under GPIO as an input, pull down
the momentary contact switches are connected between a GPIO and ground. I have two.
One I eventually want to use to generate a MOB alarm and create a waypoint in OCPN..
The other I want to use to cancel alarms by clearing all messages and setting another GPIO to low.
Let's say I have a temperature sensor that triggers an alarm above a certain temperature. I have actions configured to display a message and set a GPIO output high which operates a relay that lights an illuminated push button switch.
The idea is that you press the illuminated button to clear the alarm from the display and turn off the light.
How do I set up an action that detects that the push button has been pushed?
Chris