node-red-contrib-periph-io-expander 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -9
- package/examples/mcp23008/demo.json +45 -27
- package/examples/mcp23017/demo.json +86 -21
- package/examples/pca6408a/demo.json +36 -18
- package/examples/pca6416a/demo.json +36 -18
- package/examples/pca9536/demo.json +27 -9
- package/examples/pca9539/demo.json +36 -18
- package/examples/pcf8574/demo.json +102 -14
- package/examples/pcf8575/demo.json +1 -70
- package/examples/tca9554/demo.json +185 -0
- package/examples/tpic6b595/demo.json +1 -117
- package/nodes/mcp23008/mcp23008.html +55 -33
- package/nodes/mcp23008/mcp23008.js +25 -14
- package/nodes/mcp23017/mcp23017.html +39 -13
- package/nodes/mcp23017/mcp23017.js +17 -11
- package/nodes/pca6408a/pca6408a.html +46 -22
- package/nodes/pca6408a/pca6408a.js +25 -14
- package/nodes/pca6416a/pca6416a.html +46 -22
- package/nodes/pca6416a/pca6416a.js +26 -15
- package/nodes/pca9536/pca9536.html +38 -14
- package/nodes/pca9536/pca9536.js +25 -14
- package/nodes/pca9539/pca9539.html +46 -22
- package/nodes/pca9539/pca9539.js +26 -15
- package/nodes/pcf8574/pcf8574.html +39 -13
- package/nodes/pcf8574/pcf8574.js +17 -11
- package/nodes/pcf8575/pcf8575.html +39 -13
- package/nodes/pcf8575/pcf8575.js +17 -11
- package/nodes/tca9554/tca9554.html +101 -0
- package/nodes/tca9554/tca9554.js +79 -0
- package/nodes/tpic6b595/tpic6b595.html +50 -24
- package/nodes/tpic6b595/tpic6b595.js +19 -13
- package/package.json +10 -11
- package/index.js +0 -11
|
@@ -39,20 +39,26 @@
|
|
|
39
39
|
]
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"id": "pca9539-device-1",
|
|
44
|
+
"type": "pca9539-device",
|
|
45
|
+
"name": "PCA9539",
|
|
46
|
+
"address": "74",
|
|
47
|
+
"bus": "1",
|
|
48
|
+
"intPin": "",
|
|
49
|
+
"gpioChip": "0"
|
|
50
|
+
},
|
|
42
51
|
{
|
|
43
52
|
"id": "mcp_write",
|
|
44
|
-
"type": "
|
|
53
|
+
"type": "pca9539",
|
|
45
54
|
"z": "tab_pca9539_demo",
|
|
46
55
|
"name": "Write LEDs",
|
|
47
|
-
"bus": "1",
|
|
48
|
-
"address": "74",
|
|
49
|
-
"gpioChip": "0",
|
|
50
|
-
"intPin": "",
|
|
51
56
|
"x": 560,
|
|
52
57
|
"y": 60,
|
|
53
58
|
"wires": [
|
|
54
59
|
[]
|
|
55
|
-
]
|
|
60
|
+
],
|
|
61
|
+
"device": "pca9539-device-1"
|
|
56
62
|
},
|
|
57
63
|
{
|
|
58
64
|
"id": "inj_port",
|
|
@@ -72,22 +78,28 @@
|
|
|
72
78
|
]
|
|
73
79
|
]
|
|
74
80
|
},
|
|
81
|
+
{
|
|
82
|
+
"id": "pca9539-device-2",
|
|
83
|
+
"type": "pca9539-device",
|
|
84
|
+
"name": "PCA9539",
|
|
85
|
+
"address": "74",
|
|
86
|
+
"bus": "1",
|
|
87
|
+
"intPin": "",
|
|
88
|
+
"gpioChip": "0"
|
|
89
|
+
},
|
|
75
90
|
{
|
|
76
91
|
"id": "mcp_port",
|
|
77
|
-
"type": "
|
|
92
|
+
"type": "pca9539",
|
|
78
93
|
"z": "tab_pca9539_demo",
|
|
79
94
|
"name": "Read all pins",
|
|
80
|
-
"bus": "1",
|
|
81
|
-
"address": "74",
|
|
82
|
-
"gpioChip": "0",
|
|
83
|
-
"intPin": "",
|
|
84
95
|
"x": 330,
|
|
85
96
|
"y": 160,
|
|
86
97
|
"wires": [
|
|
87
98
|
[
|
|
88
99
|
"fn_hex"
|
|
89
100
|
]
|
|
90
|
-
]
|
|
101
|
+
],
|
|
102
|
+
"device": "pca9539-device-2"
|
|
91
103
|
},
|
|
92
104
|
{
|
|
93
105
|
"id": "fn_hex",
|
|
@@ -135,22 +147,28 @@
|
|
|
135
147
|
]
|
|
136
148
|
]
|
|
137
149
|
},
|
|
150
|
+
{
|
|
151
|
+
"id": "pca9539-device-3",
|
|
152
|
+
"type": "pca9539-device",
|
|
153
|
+
"name": "PCA9539",
|
|
154
|
+
"address": "74",
|
|
155
|
+
"bus": "1",
|
|
156
|
+
"intPin": "",
|
|
157
|
+
"gpioChip": "0"
|
|
158
|
+
},
|
|
138
159
|
{
|
|
139
160
|
"id": "mcp_btn",
|
|
140
|
-
"type": "
|
|
161
|
+
"type": "pca9539",
|
|
141
162
|
"z": "tab_pca9539_demo",
|
|
142
163
|
"name": "Read P10",
|
|
143
|
-
"bus": "1",
|
|
144
|
-
"address": "74",
|
|
145
|
-
"gpioChip": "0",
|
|
146
|
-
"intPin": "",
|
|
147
164
|
"x": 330,
|
|
148
165
|
"y": 260,
|
|
149
166
|
"wires": [
|
|
150
167
|
[
|
|
151
168
|
"dbg_btn"
|
|
152
169
|
]
|
|
153
|
-
]
|
|
170
|
+
],
|
|
171
|
+
"device": "pca9539-device-3"
|
|
154
172
|
},
|
|
155
173
|
{
|
|
156
174
|
"id": "dbg_btn",
|
|
@@ -15,18 +15,33 @@
|
|
|
15
15
|
"payloadType": "json",
|
|
16
16
|
"x": 120,
|
|
17
17
|
"y": 100,
|
|
18
|
-
"wires": [
|
|
18
|
+
"wires": [
|
|
19
|
+
[
|
|
20
|
+
"pcf8574_read"
|
|
21
|
+
]
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "pcf8574-device-1",
|
|
26
|
+
"type": "pcf8574-device",
|
|
27
|
+
"name": "PCF8574",
|
|
28
|
+
"bus": "1",
|
|
29
|
+
"address": "20"
|
|
19
30
|
},
|
|
20
31
|
{
|
|
21
32
|
"id": "pcf8574_read",
|
|
22
|
-
"type": "
|
|
33
|
+
"type": "pcf8574",
|
|
23
34
|
"z": "tab_pcf8574_demo",
|
|
24
35
|
"name": "PCF8574 read",
|
|
25
|
-
"bus": "1",
|
|
26
|
-
"address": "20",
|
|
27
36
|
"x": 320,
|
|
28
37
|
"y": 100,
|
|
29
|
-
"wires": [
|
|
38
|
+
"wires": [
|
|
39
|
+
[
|
|
40
|
+
"fn_mirror",
|
|
41
|
+
"debug_port"
|
|
42
|
+
]
|
|
43
|
+
],
|
|
44
|
+
"device": "pcf8574-device-1"
|
|
30
45
|
},
|
|
31
46
|
{
|
|
32
47
|
"id": "fn_mirror",
|
|
@@ -37,23 +52,96 @@
|
|
|
37
52
|
"outputs": 4,
|
|
38
53
|
"x": 540,
|
|
39
54
|
"y": 100,
|
|
40
|
-
"wires": [
|
|
55
|
+
"wires": [
|
|
56
|
+
[
|
|
57
|
+
"pcf8574_p0"
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"pcf8574_p1"
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
"pcf8574_p2"
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"pcf8574_p3"
|
|
67
|
+
]
|
|
68
|
+
]
|
|
41
69
|
},
|
|
42
70
|
{
|
|
43
|
-
"id": "
|
|
44
|
-
"
|
|
71
|
+
"id": "pcf8574-device-2",
|
|
72
|
+
"type": "pcf8574-device",
|
|
73
|
+
"name": "PCF8574",
|
|
74
|
+
"bus": "1",
|
|
75
|
+
"address": "20"
|
|
45
76
|
},
|
|
46
77
|
{
|
|
47
|
-
"id": "
|
|
48
|
-
"
|
|
78
|
+
"id": "pcf8574_p0",
|
|
79
|
+
"type": "pcf8574",
|
|
80
|
+
"z": "tab_pcf8574_demo",
|
|
81
|
+
"name": "PCF8574 P0",
|
|
82
|
+
"x": 760,
|
|
83
|
+
"y": 60,
|
|
84
|
+
"wires": [
|
|
85
|
+
[]
|
|
86
|
+
],
|
|
87
|
+
"device": "pcf8574-device-2"
|
|
49
88
|
},
|
|
50
89
|
{
|
|
51
|
-
"id": "
|
|
52
|
-
"
|
|
90
|
+
"id": "pcf8574-device-3",
|
|
91
|
+
"type": "pcf8574-device",
|
|
92
|
+
"name": "PCF8574",
|
|
93
|
+
"bus": "1",
|
|
94
|
+
"address": "20"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "pcf8574_p1",
|
|
98
|
+
"type": "pcf8574",
|
|
99
|
+
"z": "tab_pcf8574_demo",
|
|
100
|
+
"name": "PCF8574 P1",
|
|
101
|
+
"x": 760,
|
|
102
|
+
"y": 100,
|
|
103
|
+
"wires": [
|
|
104
|
+
[]
|
|
105
|
+
],
|
|
106
|
+
"device": "pcf8574-device-3"
|
|
53
107
|
},
|
|
54
108
|
{
|
|
55
|
-
"id": "
|
|
56
|
-
"
|
|
109
|
+
"id": "pcf8574-device-4",
|
|
110
|
+
"type": "pcf8574-device",
|
|
111
|
+
"name": "PCF8574",
|
|
112
|
+
"bus": "1",
|
|
113
|
+
"address": "20"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "pcf8574_p2",
|
|
117
|
+
"type": "pcf8574",
|
|
118
|
+
"z": "tab_pcf8574_demo",
|
|
119
|
+
"name": "PCF8574 P2",
|
|
120
|
+
"x": 760,
|
|
121
|
+
"y": 140,
|
|
122
|
+
"wires": [
|
|
123
|
+
[]
|
|
124
|
+
],
|
|
125
|
+
"device": "pcf8574-device-4"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "pcf8574-device-5",
|
|
129
|
+
"type": "pcf8574-device",
|
|
130
|
+
"name": "PCF8574",
|
|
131
|
+
"bus": "1",
|
|
132
|
+
"address": "20"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "pcf8574_p3",
|
|
136
|
+
"type": "pcf8574",
|
|
137
|
+
"z": "tab_pcf8574_demo",
|
|
138
|
+
"name": "PCF8574 P3",
|
|
139
|
+
"x": 760,
|
|
140
|
+
"y": 180,
|
|
141
|
+
"wires": [
|
|
142
|
+
[]
|
|
143
|
+
],
|
|
144
|
+
"device": "pcf8574-device-5"
|
|
57
145
|
},
|
|
58
146
|
{
|
|
59
147
|
"id": "debug_port",
|
|
@@ -1,70 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "pcf8575-demo",
|
|
3
|
-
"type": "tab",
|
|
4
|
-
"label": "PCF8575 Demo",
|
|
5
|
-
"info": "16-bit IO expander demo. Port 0 (P00–P07) drives active-low LEDs; Port 1 (P10–P17) reads push buttons with internal pull-up. Every 200ms the buttons are mirrored to the LEDs. Use inject nodes to read individual pins or ports manually.",
|
|
6
|
-
"nodes": [
|
|
7
|
-
{
|
|
8
|
-
"id": "pcf8575-1",
|
|
9
|
-
"type": "periph-pcf8575",
|
|
10
|
-
"z": "pcf8575-demo",
|
|
11
|
-
"bus": "1",
|
|
12
|
-
"address": "20",
|
|
13
|
-
"name": "PCF8575",
|
|
14
|
-
"wires": [[]]
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": "inject-periodic",
|
|
18
|
-
"type": "inject",
|
|
19
|
-
"z": "pcf8575-demo",
|
|
20
|
-
"name": "Tick (200ms)",
|
|
21
|
-
"topic": "",
|
|
22
|
-
"payload": "",
|
|
23
|
-
"payloadType": "date",
|
|
24
|
-
"repeat": "0.2",
|
|
25
|
-
"crontab": "",
|
|
26
|
-
"once": true,
|
|
27
|
-
"onceDelay": "",
|
|
28
|
-
"wires": [["pcf8575-1"]]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"id": "read-port0",
|
|
32
|
-
"type": "inject",
|
|
33
|
-
"z": "pcf8575-demo",
|
|
34
|
-
"name": "Read Port 0",
|
|
35
|
-
"topic": "",
|
|
36
|
-
"payload": "{\"port\": 0}",
|
|
37
|
-
"payloadType": "json",
|
|
38
|
-
"repeat": "",
|
|
39
|
-
"crontab": "",
|
|
40
|
-
"once": false,
|
|
41
|
-
"onceDelay": "",
|
|
42
|
-
"wires": [["pcf8575-1"]]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"id": "read-port1",
|
|
46
|
-
"type": "inject",
|
|
47
|
-
"z": "pcf8575-demo",
|
|
48
|
-
"name": "Read Port 1",
|
|
49
|
-
"topic": "",
|
|
50
|
-
"payload": "{\"port\": 1}",
|
|
51
|
-
"payloadType": "json",
|
|
52
|
-
"repeat": "",
|
|
53
|
-
"crontab": "",
|
|
54
|
-
"once": false,
|
|
55
|
-
"onceDelay": "",
|
|
56
|
-
"wires": [["pcf8575-1"]]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"id": "debug-out",
|
|
60
|
-
"type": "debug",
|
|
61
|
-
"z": "pcf8575-demo",
|
|
62
|
-
"name": "",
|
|
63
|
-
"active": true,
|
|
64
|
-
"console": "true",
|
|
65
|
-
"complete": "false",
|
|
66
|
-
"statusVal": "",
|
|
67
|
-
"wires": []
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
1
|
+
[{"id": "pcf8575-demo", "type": "tab", "label": "PCF8575 Demo", "info": "16-bit IO expander demo. Port 0 (P00–P07) drives active-low LEDs; Port 1 (P10–P17) reads push buttons with internal pull-up. Every 200ms the buttons are mirrored to the LEDs. Use inject nodes to read individual pins or ports manually."}, {"id": "pcf8575-device-1", "type": "pcf8575-device", "name": "PCF8575", "bus": "1", "address": "20"}, {"id": "pcf8575-1", "type": "pcf8575", "z": "pcf8575-demo", "name": "PCF8575", "wires": [[]], "device": "pcf8575-device-1"}, {"id": "inject-periodic", "type": "inject", "z": "pcf8575-demo", "name": "Tick (200ms)", "topic": "", "payload": "", "payloadType": "date", "repeat": "0.2", "crontab": "", "once": true, "onceDelay": "", "wires": [["pcf8575-1"]]}, {"id": "read-port0", "type": "inject", "z": "pcf8575-demo", "name": "Read Port 0", "topic": "", "payload": "{\"port\": 0}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "wires": [["pcf8575-1"]]}, {"id": "read-port1", "type": "inject", "z": "pcf8575-demo", "name": "Read Port 1", "topic": "", "payload": "{\"port\": 1}", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "wires": [["pcf8575-1"]]}, {"id": "debug-out", "type": "debug", "z": "pcf8575-demo", "name": "", "active": true, "console": "true", "complete": "false", "statusVal": "", "wires": []}]
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "tab_tca9554_demo",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "TCA9554 Demo",
|
|
6
|
+
"info": "Output control and input polling on the TCA9554 8-bit I²C / SMBus IO expander.\n\nHardware:\n- P0–P3: four LEDs (anode through 220 Ω, cathode to GND; active-high)\n- P4–P7: push buttons to GND (the internal 100 kΩ pull-ups hold the inputs high)\n\nHow it works:\n1. An Inject node every 200 ms feeds a Function node that writes a rotating one-hot pattern to the LEDs (P0→P3), one pin at a time.\n2. A second Inject node reads the full 8-bit port every second; a Function node formats the hex value for a Debug node.\n3. A third Inject node reads P4 (a button input); a Debug node shows the 0/1 level.\n\nWith the INT line wired (set the INT GPIO line in the node's config panel) the node also emits { port: 0, changed, value } whenever a button on P4–P7 changes.\n\nTo observe: watch the LEDs chase and press the buttons; the port value changes in the debug sidebar."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"id": "inj_rotate",
|
|
10
|
+
"type": "inject",
|
|
11
|
+
"z": "tab_tca9554_demo",
|
|
12
|
+
"name": "Rotate 200ms",
|
|
13
|
+
"repeat": "0.2",
|
|
14
|
+
"payload": "",
|
|
15
|
+
"payloadType": "date",
|
|
16
|
+
"topic": "",
|
|
17
|
+
"once": false,
|
|
18
|
+
"x": 120,
|
|
19
|
+
"y": 60,
|
|
20
|
+
"wires": [
|
|
21
|
+
[
|
|
22
|
+
"fn_rotate"
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "fn_rotate",
|
|
28
|
+
"type": "function",
|
|
29
|
+
"z": "tab_tca9554_demo",
|
|
30
|
+
"name": "One-hot pattern",
|
|
31
|
+
"func": "const i = Math.floor(Date.now() / 200) % 4;\nconst prev = (i + 3) % 4;\nreturn [[{ payload: { pin: prev, value: 0 } }, { payload: { pin: i, value: 1 } }]];",
|
|
32
|
+
"outputs": 1,
|
|
33
|
+
"noerr": 0,
|
|
34
|
+
"x": 330,
|
|
35
|
+
"y": 60,
|
|
36
|
+
"wires": [
|
|
37
|
+
[
|
|
38
|
+
"mcp_write"
|
|
39
|
+
]
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "tca9554-device-1",
|
|
44
|
+
"type": "tca9554-device",
|
|
45
|
+
"name": "TCA9554",
|
|
46
|
+
"address": "20",
|
|
47
|
+
"bus": "1",
|
|
48
|
+
"intPin": "",
|
|
49
|
+
"gpioChip": "0"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "mcp_write",
|
|
53
|
+
"type": "tca9554",
|
|
54
|
+
"z": "tab_tca9554_demo",
|
|
55
|
+
"name": "Write LEDs",
|
|
56
|
+
"x": 560,
|
|
57
|
+
"y": 60,
|
|
58
|
+
"wires": [
|
|
59
|
+
[]
|
|
60
|
+
],
|
|
61
|
+
"device": "tca9554-device-1"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "inj_port",
|
|
65
|
+
"type": "inject",
|
|
66
|
+
"z": "tab_tca9554_demo",
|
|
67
|
+
"name": "Read port 1s",
|
|
68
|
+
"repeat": "1",
|
|
69
|
+
"payload": "{\"port\":0}",
|
|
70
|
+
"payloadType": "json",
|
|
71
|
+
"topic": "",
|
|
72
|
+
"once": false,
|
|
73
|
+
"x": 120,
|
|
74
|
+
"y": 160,
|
|
75
|
+
"wires": [
|
|
76
|
+
[
|
|
77
|
+
"mcp_port"
|
|
78
|
+
]
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "tca9554-device-2",
|
|
83
|
+
"type": "tca9554-device",
|
|
84
|
+
"name": "TCA9554",
|
|
85
|
+
"address": "20",
|
|
86
|
+
"bus": "1",
|
|
87
|
+
"intPin": "",
|
|
88
|
+
"gpioChip": "0"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "mcp_port",
|
|
92
|
+
"type": "tca9554",
|
|
93
|
+
"z": "tab_tca9554_demo",
|
|
94
|
+
"name": "Read port",
|
|
95
|
+
"x": 330,
|
|
96
|
+
"y": 160,
|
|
97
|
+
"wires": [
|
|
98
|
+
[
|
|
99
|
+
"fn_hex"
|
|
100
|
+
]
|
|
101
|
+
],
|
|
102
|
+
"device": "tca9554-device-2"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "fn_hex",
|
|
106
|
+
"type": "function",
|
|
107
|
+
"z": "tab_tca9554_demo",
|
|
108
|
+
"name": "Format hex",
|
|
109
|
+
"func": "msg.payload = 'PIO=0x' + msg.payload.value.toString(16).padStart(2, '0');\nreturn msg;",
|
|
110
|
+
"outputs": 1,
|
|
111
|
+
"noerr": 0,
|
|
112
|
+
"x": 540,
|
|
113
|
+
"y": 160,
|
|
114
|
+
"wires": [
|
|
115
|
+
[
|
|
116
|
+
"dbg_port"
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "dbg_port",
|
|
122
|
+
"type": "debug",
|
|
123
|
+
"z": "tab_tca9554_demo",
|
|
124
|
+
"name": "Port value",
|
|
125
|
+
"active": true,
|
|
126
|
+
"tosidebar": true,
|
|
127
|
+
"complete": "payload",
|
|
128
|
+
"x": 740,
|
|
129
|
+
"y": 160,
|
|
130
|
+
"wires": []
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "inj_btn",
|
|
134
|
+
"type": "inject",
|
|
135
|
+
"z": "tab_tca9554_demo",
|
|
136
|
+
"name": "Read P4 500ms",
|
|
137
|
+
"repeat": "0.5",
|
|
138
|
+
"payload": "{\"pin\":4}",
|
|
139
|
+
"payloadType": "json",
|
|
140
|
+
"topic": "",
|
|
141
|
+
"once": false,
|
|
142
|
+
"x": 120,
|
|
143
|
+
"y": 260,
|
|
144
|
+
"wires": [
|
|
145
|
+
[
|
|
146
|
+
"mcp_btn"
|
|
147
|
+
]
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "tca9554-device-3",
|
|
152
|
+
"type": "tca9554-device",
|
|
153
|
+
"name": "TCA9554",
|
|
154
|
+
"address": "20",
|
|
155
|
+
"bus": "1",
|
|
156
|
+
"intPin": "",
|
|
157
|
+
"gpioChip": "0"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "mcp_btn",
|
|
161
|
+
"type": "tca9554",
|
|
162
|
+
"z": "tab_tca9554_demo",
|
|
163
|
+
"name": "Read P4",
|
|
164
|
+
"x": 330,
|
|
165
|
+
"y": 260,
|
|
166
|
+
"wires": [
|
|
167
|
+
[
|
|
168
|
+
"dbg_btn"
|
|
169
|
+
]
|
|
170
|
+
],
|
|
171
|
+
"device": "tca9554-device-3"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "dbg_btn",
|
|
175
|
+
"type": "debug",
|
|
176
|
+
"z": "tab_tca9554_demo",
|
|
177
|
+
"name": "P4 level",
|
|
178
|
+
"active": true,
|
|
179
|
+
"tosidebar": true,
|
|
180
|
+
"complete": "payload",
|
|
181
|
+
"x": 540,
|
|
182
|
+
"y": 260,
|
|
183
|
+
"wires": []
|
|
184
|
+
}
|
|
185
|
+
]
|
|
@@ -1,117 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "tpic6b595-demo",
|
|
3
|
-
"type": "tab",
|
|
4
|
-
"label": "TPIC6B595 Demo",
|
|
5
|
-
"info": "TPIC6B595 power SIPO demo: two cascaded devices driving 16 LEDs as an automotive-cluster-style indicator bank. Every 150 ms an inject node drives a 'knight rider' chase pattern that walks a single lit LED across all 16 outputs and back. Every 5 seconds a second inject toggles { outputEnable: false } for 500 ms to demonstrate glitch-free global blanking via G — the chase pattern's shadow state is preserved, so the LEDs resume exactly where they left off when G is re-enabled.",
|
|
6
|
-
"nodes": [
|
|
7
|
-
{
|
|
8
|
-
"id": "tpic6b595-1",
|
|
9
|
-
"type": "periph-tpic6b595",
|
|
10
|
-
"z": "tpic6b595-demo",
|
|
11
|
-
"name": "TPIC6B595 × 2",
|
|
12
|
-
"rckPin": "17",
|
|
13
|
-
"srclrPin": "16",
|
|
14
|
-
"gPin": "15",
|
|
15
|
-
"numDevices": "2",
|
|
16
|
-
"wires": [[]]
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "inject-chase-0",
|
|
20
|
-
"type": "inject",
|
|
21
|
-
"z": "tpic6b595-demo",
|
|
22
|
-
"name": "Chase step 0 (DRAIN0)",
|
|
23
|
-
"topic": "",
|
|
24
|
-
"payload": "{\"values\": [1, 0]}",
|
|
25
|
-
"payloadType": "json",
|
|
26
|
-
"repeat": "",
|
|
27
|
-
"crontab": "",
|
|
28
|
-
"once": true,
|
|
29
|
-
"onceDelay": "0.1",
|
|
30
|
-
"wires": [["tpic6b595-1"]]
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"id": "inject-chase-1",
|
|
34
|
-
"type": "inject",
|
|
35
|
-
"z": "tpic6b595-demo",
|
|
36
|
-
"name": "Chase step 1 (DRAIN1)",
|
|
37
|
-
"topic": "",
|
|
38
|
-
"payload": "{\"values\": [2, 0]}",
|
|
39
|
-
"payloadType": "json",
|
|
40
|
-
"repeat": "",
|
|
41
|
-
"crontab": "",
|
|
42
|
-
"once": true,
|
|
43
|
-
"onceDelay": "0.25",
|
|
44
|
-
"wires": [["tpic6b595-1"]]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"id": "inject-chase-2",
|
|
48
|
-
"type": "inject",
|
|
49
|
-
"z": "tpic6b595-demo",
|
|
50
|
-
"name": "Chase step 2 (DRAIN2)",
|
|
51
|
-
"topic": "",
|
|
52
|
-
"payload": "{\"values\": [4, 0]}",
|
|
53
|
-
"payloadType": "json",
|
|
54
|
-
"repeat": "",
|
|
55
|
-
"crontab": "",
|
|
56
|
-
"once": true,
|
|
57
|
-
"onceDelay": "0.4",
|
|
58
|
-
"wires": [["tpic6b595-1"]]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"id": "inject-chase-3",
|
|
62
|
-
"type": "inject",
|
|
63
|
-
"z": "tpic6b595-demo",
|
|
64
|
-
"name": "Chase step 3 (DRAIN3)",
|
|
65
|
-
"topic": "",
|
|
66
|
-
"payload": "{\"values\": [8, 0]}",
|
|
67
|
-
"payloadType": "json",
|
|
68
|
-
"repeat": "",
|
|
69
|
-
"crontab": "",
|
|
70
|
-
"once": true,
|
|
71
|
-
"onceDelay": "0.55",
|
|
72
|
-
"wires": [["tpic6b595-1"]]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"id": "inject-chase-4",
|
|
76
|
-
"type": "inject",
|
|
77
|
-
"z": "tpic6b595-demo",
|
|
78
|
-
"name": "Chase step 4 (DRAIN4)",
|
|
79
|
-
"topic": "",
|
|
80
|
-
"payload": "{\"values\": [16, 0]}",
|
|
81
|
-
"payloadType": "json",
|
|
82
|
-
"repeat": "",
|
|
83
|
-
"crontab": "",
|
|
84
|
-
"once": true,
|
|
85
|
-
"onceDelay": "0.7",
|
|
86
|
-
"wires": [["tpic6b595-1"]]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"id": "inject-blank",
|
|
90
|
-
"type": "inject",
|
|
91
|
-
"z": "tpic6b595-demo",
|
|
92
|
-
"name": "Blank via G (Full)",
|
|
93
|
-
"topic": "",
|
|
94
|
-
"payload": "{\"outputEnable\": false}",
|
|
95
|
-
"payloadType": "json",
|
|
96
|
-
"repeat": "5",
|
|
97
|
-
"crontab": "",
|
|
98
|
-
"once": false,
|
|
99
|
-
"onceDelay": "",
|
|
100
|
-
"wires": [["tpic6b595-1"]]
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"id": "inject-unblank",
|
|
104
|
-
"type": "inject",
|
|
105
|
-
"z": "tpic6b595-demo",
|
|
106
|
-
"name": "Un-blank via G (Full)",
|
|
107
|
-
"topic": "",
|
|
108
|
-
"payload": "{\"outputEnable\": true}",
|
|
109
|
-
"payloadType": "json",
|
|
110
|
-
"repeat": "5",
|
|
111
|
-
"crontab": "",
|
|
112
|
-
"once": false,
|
|
113
|
-
"onceDelay": "0.5",
|
|
114
|
-
"wires": [["tpic6b595-1"]]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
1
|
+
[{"id": "tpic6b595-demo", "type": "tab", "label": "TPIC6B595 Demo", "info": "TPIC6B595 power SIPO demo: two cascaded devices driving 16 LEDs as an automotive-cluster-style indicator bank. Every 150 ms an inject node drives a 'knight rider' chase pattern that walks a single lit LED across all 16 outputs and back. Every 5 seconds a second inject toggles { outputEnable: false } for 500 ms to demonstrate glitch-free global blanking via G — the chase pattern's shadow state is preserved, so the LEDs resume exactly where they left off when G is re-enabled."}, {"id": "tpic6b595-device-1", "type": "tpic6b595-device", "name": "TPIC6B595", "gPin": "15", "rckPin": "17", "srclrPin": "16", "numDevices": "2"}, {"id": "tpic6b595-1", "type": "tpic6b595", "z": "tpic6b595-demo", "name": "TPIC6B595 × 2", "wires": [[]], "device": "tpic6b595-device-1"}, {"id": "inject-chase-0", "type": "inject", "z": "tpic6b595-demo", "name": "Chase step 0 (DRAIN0)", "topic": "", "payload": "{\"values\": [1, 0]}", "payloadType": "json", "repeat": "", "crontab": "", "once": true, "onceDelay": "0.1", "wires": [["tpic6b595-1"]]}, {"id": "inject-chase-1", "type": "inject", "z": "tpic6b595-demo", "name": "Chase step 1 (DRAIN1)", "topic": "", "payload": "{\"values\": [2, 0]}", "payloadType": "json", "repeat": "", "crontab": "", "once": true, "onceDelay": "0.25", "wires": [["tpic6b595-1"]]}, {"id": "inject-chase-2", "type": "inject", "z": "tpic6b595-demo", "name": "Chase step 2 (DRAIN2)", "topic": "", "payload": "{\"values\": [4, 0]}", "payloadType": "json", "repeat": "", "crontab": "", "once": true, "onceDelay": "0.4", "wires": [["tpic6b595-1"]]}, {"id": "inject-chase-3", "type": "inject", "z": "tpic6b595-demo", "name": "Chase step 3 (DRAIN3)", "topic": "", "payload": "{\"values\": [8, 0]}", "payloadType": "json", "repeat": "", "crontab": "", "once": true, "onceDelay": "0.55", "wires": [["tpic6b595-1"]]}, {"id": "inject-chase-4", "type": "inject", "z": "tpic6b595-demo", "name": "Chase step 4 (DRAIN4)", "topic": "", "payload": "{\"values\": [16, 0]}", "payloadType": "json", "repeat": "", "crontab": "", "once": true, "onceDelay": "0.7", "wires": [["tpic6b595-1"]]}, {"id": "inject-blank", "type": "inject", "z": "tpic6b595-demo", "name": "Blank via G (Full)", "topic": "", "payload": "{\"outputEnable\": false}", "payloadType": "json", "repeat": "5", "crontab": "", "once": false, "onceDelay": "", "wires": [["tpic6b595-1"]]}, {"id": "inject-unblank", "type": "inject", "z": "tpic6b595-demo", "name": "Un-blank via G (Full)", "topic": "", "payload": "{\"outputEnable\": true}", "payloadType": "json", "repeat": "5", "crontab": "", "once": false, "onceDelay": "0.5", "wires": [["tpic6b595-1"]]}]
|