Smick_07_analog_input

Analog input example.

[
    {
        "id": "3702931e.5e738c",
        "type": "tab",
        "label": "analog_input"
    },
    {
        "id": "98549741.e92a08",
        "type": "link out",
        "z": "3702931e.5e738c",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 875,
        "y": 360,
        "wires": []
    },
    {
        "id": "5cd4b0bc.61ec4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "event",
        "info": "",
        "x": 210,
        "y": 600,
        "wires": []
    },
    {
        "id": "4a4dc18.d303b4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "Description",
        "info": "Smick_07_analog_input\n\nQuesto flusso mostra l'uso di sensori analogici (Potentiometer, LDR,...).\nSi apprenderà come configurare smick per generare:\n- sequenze di misure lette dal sensore;\n- l'evento LOW quando le misure scendono al di sotto di una soglia data;\n- l'evento HIGH quando le misure superano una soglia data.\nLa dashboard associata consente di:\n- abilitare/disabilitare i suddetti eventi;\n- di visualizzare in tempo reale le misure ricevute su un indicatore (gauge);\n- di visualizzare l'ultimo allarme LOW/HIGH rilevato ed inviato su e-mail e twitter.\n\n\nThis flow shows the use of analog sensors (potentiometer, LDR, ...).\nYou will learn how to configure Smick to generate:\n- Measurement sequences read from the sensor;\n- The LOW event when measurements fall below a certain threshold;\n- The High event when measurements exceed a certain threshold.\nThe associated dashboard allows you to:\n- Enable / disable these events;\n- Measurements of real-time display on a received indicator (gauge);\n- Displays the last LOW / HIGH detected and sent to e-mail alarm and Twitter.",
        "x": 130,
        "y": 80,
        "wires": []
    },
    {
        "id": "f67a6c9.bbf979",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "Licence & History",
        "info": "Package : Smick v.1\nModule  : LED - digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.17  Curci   genesis",
        "x": 300,
        "y": 80,
        "wires": []
    },
    {
        "id": "b321816d.e6643",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "BOM",
        "info": "Bill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n    1 Pot | LDR + 10kohm resistor\n\nHW Connections:\n\n    Device  pin     Smick pin\n    Pot     left    GND\n    Pot     center  A0\n    Pot     right   3.3V\n    \n    or \n    \n    Device  pin     Smick pin    \n    LDR     1       GND\n    LDR     2       A0\n    R 10k   1       A0\n    R 10k   2       GND\n\nFlow Connections:\n\n    Smick_001_console\n\nAccount:\n\n    Wi-Fi credentials\n    MQTT broker\n    FRED\n    E-mail\n    Twitter\n",
        "x": 450,
        "y": 80,
        "wires": []
    },
    {
        "id": "e34ada82.ce1898",
        "type": "ui_gauge",
        "z": "3702931e.5e738c",
        "name": "analog sensor",
        "group": "86ea6b6a.d47108",
        "order": 2,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "sensor",
        "label": "",
        "format": "{{value}}",
        "min": 0,
        "max": "1023",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "x": 760,
        "y": 660,
        "wires": []
    },
    {
        "id": "55489c49.1210f4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "enable/disable",
        "info": "",
        "x": 580,
        "y": 300,
        "wires": []
    },
    {
        "id": "265dc9e1.2f9e86",
        "type": "ui_dropdown",
        "z": "3702931e.5e738c",
        "name": "",
        "label": "mode",
        "group": "86ea6b6a.d47108",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "options": [
            {
                "label": "disable",
                "value": "[email protected];A0==NULL",
                "type": "str"
            },
            {
                "label": "enable",
                "value": "[email protected]",
                "type": "str"
            },
            {
                "label": "set LOW alarm",
                "value": "LOW==A0<200",
                "type": "str"
            },
            {
                "label": "set HIGH alarm",
                "value": "HIGH==A0>800",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "",
        "x": 730,
        "y": 360,
        "wires": [
            [
                "98549741.e92a08"
            ]
        ]
    },
    {
        "id": "1e4f5474.11f4cc",
        "type": "link in",
        "z": "3702931e.5e738c",
        "name": "response_event",
        "links": [
            "ca2d688.4211598"
        ],
        "x": 215,
        "y": 640,
        "wires": [
            [
                "719ce64b.0350e8"
            ]
        ]
    },
    {
        "id": "719ce64b.0350e8",
        "type": "switch",
        "z": "3702931e.5e738c",
        "name": "parse",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "CONN",
                "vt": "str"
            },
            {
                "t": "regex",
                "v": "HIGH|LOW",
                "vt": "str",
                "case": false
            },
            {
                "t": "btwn",
                "v": "0",
                "vt": "num",
                "v2": "1023",
                "v2t": "num"
            }
        ],
        "checkall": "false",
        "outputs": 3,
        "x": 330,
        "y": 640,
        "wires": [
            [
                "d0f542c0.413dd"
            ],
            [
                "b9fd2ce1.0ec86"
            ],
            [
                "e34ada82.ce1898"
            ]
        ]
    },
    {
        "id": "b9fd2ce1.0ec86",
        "type": "link out",
        "z": "3702931e.5e738c",
        "name": "alarm",
        "links": [
            "5487d125.734a9"
        ],
        "x": 515,
        "y": 500,
        "wires": []
    },
    {
        "id": "d0f542c0.413dd",
        "type": "change",
        "z": "3702931e.5e738c",
        "name": "setup",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "HIGH==A0>800",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 360,
        "wires": [
            [
                "265dc9e1.2f9e86"
            ]
        ]
    },
    {
        "id": "2f437e43.95e222",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "actions on dashboard",
        "info": "",
        "x": 600,
        "y": 580,
        "wires": []
    },
    {
        "id": "d937e7d3.0a4af8",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "actions on social (alarm)",
        "info": "",
        "x": 610,
        "y": 440,
        "wires": []
    },
    {
        "id": "86ea6b6a.d47108",
        "type": "ui_group",
        "z": "",
        "name": "analog",
        "tab": "7322b823.63cff8",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "7322b823.63cff8",
        "type": "ui_tab",
        "z": "",
        "name": "Analog Input",
        "icon": "dashboard",
        "order": 4
    }
]
infosmick

Flow Info

created 6 months, 1 week ago

Node Types

Core
  • change (x1)
  • comment (x7)
  • switch (x1)
Other
  • link in (x1)
  • link out (x2)
  • tab (x1)
  • ui_dropdown (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_tab (x1)

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option