[
    {
        "id": "98356cb3f2f94996",
        "type": "tab",
        "label": "Week 14 — XIAO bridge",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "9eab25ab533ac4df",
        "type": "serial in",
        "z": "98356cb3f2f94996",
        "name": "",
        "serial": "4d3f6659bb047835",
        "x": 190,
        "y": 140,
        "wires": [
            [
                "eb8699dd8c41acc7"
            ]
        ]
    },
    {
        "id": "63a9313ab10773b3",
        "type": "ui-text",
        "z": "98356cb3f2f94996",
        "group": "b5c0daccf410af25",
        "order": 2,
        "width": 0,
        "height": 0,
        "name": "ui-text",
        "label": "Last button event:",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "style": false,
        "font": "",
        "fontSize": 16,
        "color": "#717171",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 530,
        "y": 140,
        "wires": []
    },
    {
        "id": "7817a9c967ebbf30",
        "type": "ui-switch",
        "z": "98356cb3f2f94996",
        "name": "ui-switch",
        "label": "LED",
        "group": "b5c0daccf410af25",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "decouple": false,
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "className": "",
        "layout": "row-spread",
        "clickableArea": "switch",
        "onvalue": "ON",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "OFF",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 160,
        "y": 220,
        "wires": [
            [
                "4a130bbef4e4110a"
            ]
        ]
    },
    {
        "id": "4a130bbef4e4110a",
        "type": "serial out",
        "z": "98356cb3f2f94996",
        "name": "",
        "serial": "4d3f6659bb047835",
        "x": 360,
        "y": 220,
        "wires": []
    },
    {
        "id": "eb8699dd8c41acc7",
        "type": "function",
        "z": "98356cb3f2f94996",
        "name": "function 1",
        "func": "// serial in delivers payload as string with \\n already stripped\nconst event = msg.payload.trim();\n\nif (event === \"PRESSED\") {\n    msg.payload = \"PRESSED\";\n} else if (event === \"RELEASED\") {\n    msg.payload = \"\";\n} else {\n    // Unknown event — drop the message\n    return null;\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 140,
        "wires": [
            [
                "63a9313ab10773b3"
            ]
        ]
    },
    {
        "id": "4d3f6659bb047835",
        "type": "serial-port",
        "name": "XiaoRP2040_comm",
        "serialport": "COM3",
        "serialbaud": "9600",
        "databits": 8,
        "parity": "none",
        "stopbits": 1,
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "\\n",
        "bin": "false",
        "out": "char",
        "addchar": "\\n",
        "responsetimeout": 10000
    },
    {
        "id": "b5c0daccf410af25",
        "type": "ui-group",
        "name": "Xiao communication",
        "page": "abf2735cc45338a9",
        "width": 6,
        "height": 1,
        "order": 1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default"
    },
    {
        "id": "abf2735cc45338a9",
        "type": "ui-page",
        "name": "week 14_programming & interface design",
        "ui": "bbe05359597c4bfd",
        "path": "/week14",
        "icon": "home",
        "layout": "grid",
        "theme": "ea99a148c60a76da",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "768",
                "cols": "9"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            }
        ],
        "order": 1,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "bbe05359597c4bfd",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": false
    },
    {
        "id": "ea99a148c60a76da",
        "type": "ui-theme",
        "name": "Default Theme",
        "colors": {
            "surface": "#ffffff",
            "primary": "#0094CE",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    },
    {
        "id": "26f91d232474cba6",
        "type": "global-config",
        "env": [],
        "modules": {
            "node-red-node-serialport": "2.0.3",
            "@flowfuse/node-red-dashboard": "1.30.2"
        }
    }
]