Toggle GPIO Input

No code version

[
    {
        "id": "db823e37fd839077",
        "type": "function",
        "z": "f87aa05e3297dcd1",
        "name": "",
        "func": "var output = !(context.get(\"toogle\")||false);\ncontext.set(\"toogle\",output);\nmsg.payload = output ? \"udp1\" : \"udp2\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 720,
        "y": 1040,
        "wires": [
            [
                "6d935a3dcad3e665"
            ]
        ]
    }
]