node-red-contrib-periph-display 1.2.1 → 1.3.0

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 CHANGED
@@ -16,8 +16,14 @@ npm install node-red-contrib-periph-display
16
16
 
17
17
  | Node | Kind | Description |
18
18
  |------|------|-------------|
19
+ | `periph-il0373` | input | Draws on an IL0373 black/white e-paper panel (104 x 212, e.g. Waveshare 2.13inch e-Paper (D)) over SPI. Drawing messages change the framebuffer only; show sends it and refreshes the panel, which blocks the node until the controller is ready again. |
19
20
  | `pcf8576-device` | config | I²C bus and address for a PCF8576 |
20
21
  | `periph-pcf8576` | input | Writes 7-segment digits or raw data to a PCF8576 40x4 universal LCD segment driver over I²C. The chip is write-only; any incoming message triggers a single write to display RAM. |
22
+ | `periph-ssd1331` | input | Draws on an SSD1331 96 x 64 RGB OLED (e.g. Waveshare 0.95inch RGB OLED) over SPI. The chip has no BUSY line. Drawing messages change the framebuffer only; show sends it to the display. The hw* messages use the controller's own drawing engine on the display RAM. |
23
+ | `periph-st7036` | output | Writes text on an ST7036 character LCD (EA DOGM081 / DOGM162 / DOGM163) in 4-wire serial mode over SPI. The serial mode is write-only; the chip has no BUSY line. Strapping: PSB = GND, E = 3V3, booster capacitors for 3.3 V. |
24
+ | `periph-uc1611s` | input | Draws on a UC1611s graphic LCD (EA DOGXL240-7, 240 x 128, black/white) over I2C or 4-wire SPI. On I2C the chip has two addresses, command ( 0x38 + 2n ) and data (one higher); the node opens both. On SPI the node needs the SPI bus / chip-select device and the GPIO lines for CD (D/C) and RST; the module must be strapped for 4-wire SPI (BM0 = D13 = VSS), and payload.status is not available. The module runs from 3.3 V only. |
25
+ | `periph-uc8159` | input | Draws on a UC8159 seven-colour e-paper panel (600 x 448, e.g. Waveshare 5.65inch e-Paper (F)) over SPI. Drawing messages change the framebuffer only; show sends it and refreshes the panel, which blocks the node for about 30 seconds. |
26
+ | `periph-uc8276c` | input | Draws on a UC8276C black/white/red e-paper panel (400 x 300, e.g. Waveshare 4.2inch e-Paper (B)) over SPI. Drawing messages change the framebuffer only; show sends it and refreshes the panel, which blocks the node for about 17 seconds. |
21
27
 
22
28
  ## Links
23
29
 
@@ -0,0 +1,115 @@
1
+ [
2
+ {
3
+ "id": "il0373_tab",
4
+ "type": "tab",
5
+ "label": "IL0373 status card",
6
+ "disabled": false,
7
+ "info": "Every 10 minutes: wake the panel, draw a status card (black header bar, black border, bar chart) and refresh it, then put the controller into deep sleep once the node reports { updated: true }. The refresh blocks the node for about 17 s. Needs a Waveshare 2.13inch e-Paper (D) on SPI0 with DC = GPIO25, RST = GPIO17, BUSY = GPIO24."
8
+ },
9
+ {
10
+ "id": "il0373_inject",
11
+ "type": "inject",
12
+ "z": "il0373_tab",
13
+ "name": "every 10 min",
14
+ "props": [
15
+ {
16
+ "p": "payload"
17
+ }
18
+ ],
19
+ "repeat": "600",
20
+ "once": true,
21
+ "onceDelay": "1",
22
+ "payload": "{}",
23
+ "payloadType": "json",
24
+ "x": 130,
25
+ "y": 100,
26
+ "wires": [
27
+ [
28
+ "il0373_card"
29
+ ]
30
+ ]
31
+ },
32
+ {
33
+ "id": "il0373_card",
34
+ "type": "function",
35
+ "z": "il0373_tab",
36
+ "name": "wake and build status card",
37
+ "func": "const values = [30, 55, 80, 45, 120, 90, 60, 100];\nconst peak = Math.max(...values);\nconst out = [\n { payload: { wake: true } },\n { payload: { clear: 'white' } },\n { payload: { rect: { x: 2, y: 2, w: 100, h: 208, color: 'black', fill: false } } },\n { payload: { rect: { x: 3, y: 3, w: 98, h: 24, color: 'black', fill: true } } },\n { payload: { line: { x0: 10, y0: 190, x1: 95, y1: 190, color: 'black' } } },\n { payload: { line: { x0: 10, y0: 60, x1: 10, y1: 190, color: 'black' } } },\n];\nvalues.forEach((v, i) => out.push({ payload: { rect: { x: 14 + i * 10, y: 190 - v, w: 8, h: v, color: 'black', fill: v === peak } } }));\nout.push({ payload: { show: true } });\nreturn [out];",
38
+ "outputs": 1,
39
+ "x": 340,
40
+ "y": 100,
41
+ "wires": [
42
+ [
43
+ "il0373_node"
44
+ ]
45
+ ]
46
+ },
47
+ {
48
+ "id": "il0373_node",
49
+ "type": "periph-il0373",
50
+ "z": "il0373_tab",
51
+ "name": "",
52
+ "spiBus": "0",
53
+ "spiDevice": "0",
54
+ "gpioChip": "0",
55
+ "dcPin": "25",
56
+ "resPin": "17",
57
+ "busyPin": "24",
58
+ "wireMode": "simplex",
59
+ "width": "400",
60
+ "height": "300",
61
+ "busyTimeout": "30000",
62
+ "autoShow": false,
63
+ "x": 590,
64
+ "y": 100,
65
+ "wires": [
66
+ [
67
+ "il0373_updated"
68
+ ]
69
+ ]
70
+ },
71
+ {
72
+ "id": "il0373_updated",
73
+ "type": "switch",
74
+ "z": "il0373_tab",
75
+ "name": "updated?",
76
+ "property": "payload.updated",
77
+ "propertyType": "msg",
78
+ "rules": [
79
+ {
80
+ "t": "true"
81
+ }
82
+ ],
83
+ "checkall": "true",
84
+ "outputs": 1,
85
+ "x": 780,
86
+ "y": 100,
87
+ "wires": [
88
+ [
89
+ "il0373_sleep"
90
+ ]
91
+ ]
92
+ },
93
+ {
94
+ "id": "il0373_sleep",
95
+ "type": "change",
96
+ "z": "il0373_tab",
97
+ "name": "sleep",
98
+ "rules": [
99
+ {
100
+ "t": "set",
101
+ "p": "payload",
102
+ "pt": "msg",
103
+ "to": "{\"sleep\":true}",
104
+ "tot": "json"
105
+ }
106
+ ],
107
+ "x": 930,
108
+ "y": 100,
109
+ "wires": [
110
+ [
111
+ "il0373_node"
112
+ ]
113
+ ]
114
+ }
115
+ ]
@@ -0,0 +1,81 @@
1
+ [
2
+ {
3
+ "id": "ssd1331_tab",
4
+ "type": "tab",
5
+ "label": "SSD1331 test card",
6
+ "disabled": false,
7
+ "info": "Draws a colour test card (eight colour bars, a gray ramp, a frame) on a Waveshare 0.95inch RGB OLED on SPI0 with DC = GPIO25, RST = GPIO17 (no BUSY), sends it once and starts the controller's hardware scroll."
8
+ },
9
+ {
10
+ "id": "ssd1331_inject",
11
+ "type": "inject",
12
+ "z": "ssd1331_tab",
13
+ "name": "draw test card",
14
+ "props": [
15
+ {
16
+ "p": "payload"
17
+ }
18
+ ],
19
+ "repeat": "",
20
+ "once": true,
21
+ "onceDelay": "1",
22
+ "payload": "{}",
23
+ "payloadType": "json",
24
+ "x": 130,
25
+ "y": 100,
26
+ "wires": [
27
+ [
28
+ "ssd1331_card"
29
+ ]
30
+ ]
31
+ },
32
+ {
33
+ "id": "ssd1331_card",
34
+ "type": "function",
35
+ "z": "ssd1331_tab",
36
+ "name": "build test card",
37
+ "func": "const out = [{ payload: { clear: 'black' } }];\nconst bars = ['white', 'yellow', 'cyan', 'green', 'magenta', 'red', 'blue', 'black'];\nbars.forEach((c, i) => out.push({ payload: { rect: { x: i * 12, y: 2, w: 12, h: 30, color: c, fill: true } } }));\nfor (let x = 0; x < 96; x++) { const g = Math.round(x * 255 / 95); out.push({ payload: { rect: { x, y: 34, w: 1, h: 26, color: [g, g, g], fill: true } } }); }\nout.push({ payload: { rect: { x: 0, y: 0, w: 96, h: 64, color: 'white' } } });\nout.push({ payload: { show: true } });\nout.push({ payload: { scroll: { horizontal: 1, startRow: 0, rows: 64, vertical: 0, interval: 0 } } });\nreturn [out];",
38
+ "outputs": 1,
39
+ "x": 330,
40
+ "y": 100,
41
+ "wires": [
42
+ [
43
+ "ssd1331_node"
44
+ ]
45
+ ]
46
+ },
47
+ {
48
+ "id": "ssd1331_node",
49
+ "type": "periph-ssd1331",
50
+ "z": "ssd1331_tab",
51
+ "name": "OLED",
52
+ "spiBus": "0",
53
+ "spiDevice": "0",
54
+ "gpioChip": "0",
55
+ "dcPin": "25",
56
+ "resPin": "17",
57
+ "autoShow": false,
58
+ "x": 520,
59
+ "y": 100,
60
+ "wires": [
61
+ [
62
+ "ssd1331_debug"
63
+ ]
64
+ ]
65
+ },
66
+ {
67
+ "id": "ssd1331_debug",
68
+ "type": "debug",
69
+ "z": "ssd1331_tab",
70
+ "name": "updated",
71
+ "active": true,
72
+ "tosidebar": true,
73
+ "console": false,
74
+ "tostatus": false,
75
+ "complete": "payload",
76
+ "targetType": "msg",
77
+ "x": 700,
78
+ "y": 100,
79
+ "wires": []
80
+ }
81
+ ]
@@ -0,0 +1,116 @@
1
+ [
2
+ {
3
+ "id": "st7036_tab",
4
+ "type": "tab",
5
+ "label": "info",
6
+ "disabled": false,
7
+ "info": "Shows a two-line status on an EA DOGM162W-A (2 x 16, 3.3 V) on SPI0 with RS = GPIO25, RESET = GPIO17: line 1 the CPU load, line 2 a bar graph built from five custom characters. The bar is refreshed every 10 s with a random value; replace the function node 'random load' with a real source (e.g. a sensor flow)."
8
+ },
9
+ {
10
+ "id": "st7036_glyphs_inject",
11
+ "type": "inject",
12
+ "z": "st7036_tab",
13
+ "name": "define glyphs",
14
+ "props": [
15
+ {
16
+ "p": "payload"
17
+ }
18
+ ],
19
+ "repeat": "",
20
+ "once": true,
21
+ "onceDelay": "1",
22
+ "payload": "{}",
23
+ "payloadType": "json",
24
+ "x": 130,
25
+ "y": 80,
26
+ "wires": [
27
+ [
28
+ "st7036_glyphs"
29
+ ]
30
+ ]
31
+ },
32
+ {
33
+ "id": "st7036_glyphs",
34
+ "type": "function",
35
+ "z": "st7036_tab",
36
+ "name": "bar glyphs",
37
+ "func": "const out = [];\nfor (let g = 0; g < 5; g++) {\n const pattern = (0x1F << (4 - g)) & 0x1F;\n out.push({ payload: { char: { index: g, rows: [0, pattern, pattern, pattern, pattern, pattern, pattern, 0] } } });\n}\nout.push({ payload: { clear: true } });\nreturn [out];",
38
+ "outputs": 1,
39
+ "x": 310,
40
+ "y": 80,
41
+ "wires": [
42
+ [
43
+ "st7036_node"
44
+ ]
45
+ ]
46
+ },
47
+ {
48
+ "id": "st7036_tick",
49
+ "type": "inject",
50
+ "z": "st7036_tab",
51
+ "name": "every 10 s",
52
+ "props": [
53
+ {
54
+ "p": "payload"
55
+ }
56
+ ],
57
+ "repeat": "10",
58
+ "once": true,
59
+ "onceDelay": "3",
60
+ "payload": "",
61
+ "payloadType": "date",
62
+ "x": 120,
63
+ "y": 160,
64
+ "wires": [
65
+ [
66
+ "st7036_load"
67
+ ]
68
+ ]
69
+ },
70
+ {
71
+ "id": "st7036_load",
72
+ "type": "function",
73
+ "z": "st7036_tab",
74
+ "name": "random load",
75
+ "func": "msg.payload = Math.round(Math.random() * 100);\nreturn msg;",
76
+ "outputs": 1,
77
+ "x": 300,
78
+ "y": 160,
79
+ "wires": [
80
+ [
81
+ "st7036_status"
82
+ ]
83
+ ]
84
+ },
85
+ {
86
+ "id": "st7036_status",
87
+ "type": "function",
88
+ "z": "st7036_tab",
89
+ "name": "status text + bar",
90
+ "func": "const bar = Math.round(Number(msg.payload) / 100 * 16 * 5);\nconst cells = [];\nfor (let col = 0; col < 16; col++) {\n const fill = bar - col * 5;\n cells.push(fill >= 5 ? 4 : fill > 0 ? fill - 1 : 0x20);\n}\nreturn [\n { payload: { text: 'CPU load ' + Math.round(Number(msg.payload)) + '% ', col: 0, row: 0 } },\n { payload: { cursor: { on: false, blink: false, col: 0, row: 1 } } },\n { payload: { chars: cells } }\n];",
91
+ "outputs": 1,
92
+ "x": 490,
93
+ "y": 160,
94
+ "wires": [
95
+ [
96
+ "st7036_node"
97
+ ]
98
+ ]
99
+ },
100
+ {
101
+ "id": "st7036_node",
102
+ "type": "periph-st7036",
103
+ "z": "st7036_tab",
104
+ "name": "DOGM162W",
105
+ "spiBus": "0",
106
+ "spiDevice": "0",
107
+ "gpioChip": "0",
108
+ "rsPin": "25",
109
+ "resPin": "17",
110
+ "lines": "2",
111
+ "supply": "3v3",
112
+ "x": 700,
113
+ "y": 120,
114
+ "wires": []
115
+ }
116
+ ]
@@ -0,0 +1,119 @@
1
+ [
2
+ {
3
+ "id": "uc1611s_tab",
4
+ "type": "tab",
5
+ "label": "info",
6
+ "disabled": false,
7
+ "info": "Bounces an 8 x 8 ball inside a frame on an EA DOGXL240-7 (240 x 128) on I2C bus 1 (command 0x38, data 0x39). A second inject toggles the inverse display and a third sets the contrast from 0x70 to 0x8F. Auto-show sends the framebuffer after every drawing message."
8
+ },
9
+ {
10
+ "id": "uc1611s_frame_inject",
11
+ "type": "inject",
12
+ "z": "uc1611s_tab",
13
+ "name": "draw frame",
14
+ "props": [{ "p": "payload" }],
15
+ "repeat": "",
16
+ "once": true,
17
+ "onceDelay": "2",
18
+ "payload": "{\"clear\":true,\"rect\":{\"x\":0,\"y\":0,\"w\":240,\"h\":128}}",
19
+ "payloadType": "json",
20
+ "x": 130,
21
+ "y": 80,
22
+ "wires": [["uc1611s_node"]]
23
+ },
24
+ {
25
+ "id": "uc1611s_tick",
26
+ "type": "inject",
27
+ "z": "uc1611s_tab",
28
+ "name": "every 100 ms",
29
+ "props": [{ "p": "payload" }],
30
+ "repeat": "0.1",
31
+ "once": true,
32
+ "onceDelay": "4",
33
+ "payload": "",
34
+ "payloadType": "date",
35
+ "x": 130,
36
+ "y": 160,
37
+ "wires": [["uc1611s_ball"]]
38
+ },
39
+ {
40
+ "id": "uc1611s_ball",
41
+ "type": "function",
42
+ "z": "uc1611s_tab",
43
+ "name": "ball",
44
+ "func": "let s = context.get('s') || { x: 20, y: 12, dx: 3, dy: 2 };\nconst erase = { rect: { x: s.x, y: s.y, w: 8, h: 8, on: false, fill: true } };\ns.x += s.dx; s.y += s.dy;\nif (s.x < 2 || s.x > 229) { s.dx = -s.dx; s.x += 2 * s.dx; }\nif (s.y < 2 || s.y > 118) { s.dy = -s.dy; s.y += 2 * s.dy; }\ncontext.set('s', s);\nreturn [[{ payload: erase }, { payload: { rect: { x: s.x, y: s.y, w: 8, h: 8, on: true, fill: true } } }]];",
45
+ "outputs": 1,
46
+ "x": 320,
47
+ "y": 160,
48
+ "wires": [["uc1611s_node"]]
49
+ },
50
+ {
51
+ "id": "uc1611s_invert",
52
+ "type": "inject",
53
+ "z": "uc1611s_tab",
54
+ "name": "toggle invert",
55
+ "props": [{ "p": "payload" }],
56
+ "repeat": "5",
57
+ "once": false,
58
+ "payload": "",
59
+ "payloadType": "date",
60
+ "x": 130,
61
+ "y": 240,
62
+ "wires": [["uc1611s_invert_fn"]]
63
+ },
64
+ {
65
+ "id": "uc1611s_invert_fn",
66
+ "type": "function",
67
+ "z": "uc1611s_tab",
68
+ "name": "flip invert state",
69
+ "func": "const on = !(context.get('inv') || false);\ncontext.set('inv', on);\nreturn { payload: { invert: on } };",
70
+ "outputs": 1,
71
+ "x": 330,
72
+ "y": 240,
73
+ "wires": [["uc1611s_node"]]
74
+ },
75
+ {
76
+ "id": "uc1611s_contrast",
77
+ "type": "inject",
78
+ "z": "uc1611s_tab",
79
+ "name": "contrast 0x70",
80
+ "props": [{ "p": "payload" }],
81
+ "repeat": "",
82
+ "once": false,
83
+ "payload": "{\"contrast\":112}",
84
+ "payloadType": "json",
85
+ "x": 130,
86
+ "y": 320,
87
+ "wires": [["uc1611s_node"]]
88
+ },
89
+ {
90
+ "id": "uc1611s_contrast_reset",
91
+ "type": "inject",
92
+ "z": "uc1611s_tab",
93
+ "name": "contrast 0x8F",
94
+ "props": [{ "p": "payload" }],
95
+ "repeat": "",
96
+ "once": false,
97
+ "payload": "{\"contrast\":143}",
98
+ "payloadType": "json",
99
+ "x": 130,
100
+ "y": 380,
101
+ "wires": [["uc1611s_node"]]
102
+ },
103
+ {
104
+ "id": "uc1611s_node",
105
+ "type": "periph-uc1611s",
106
+ "z": "uc1611s_tab",
107
+ "name": "DOGXL240-7",
108
+ "i2cBus": "1",
109
+ "address": "0x38",
110
+ "width": "240",
111
+ "height": "128",
112
+ "topView": false,
113
+ "contrast": "143",
114
+ "autoShow": true,
115
+ "x": 640,
116
+ "y": 200,
117
+ "wires": [[]]
118
+ }
119
+ ]
@@ -0,0 +1,115 @@
1
+ [
2
+ {
3
+ "id": "uc8159_tab",
4
+ "type": "tab",
5
+ "label": "UC8159 status card",
6
+ "disabled": false,
7
+ "info": "Every 10 minutes: wake the panel, draw a status card (seven colour bars with a black frame) and refresh it, then put the controller into deep sleep once the node reports { updated: true }. The refresh blocks the node for about 17 s. Needs a Waveshare 5.65inch e-Paper (F) on SPI0 with DC = GPIO25, RST = GPIO17, BUSY = GPIO24."
8
+ },
9
+ {
10
+ "id": "uc8159_inject",
11
+ "type": "inject",
12
+ "z": "uc8159_tab",
13
+ "name": "every 10 min",
14
+ "props": [
15
+ {
16
+ "p": "payload"
17
+ }
18
+ ],
19
+ "repeat": "600",
20
+ "once": true,
21
+ "onceDelay": "1",
22
+ "payload": "{}",
23
+ "payloadType": "json",
24
+ "x": 130,
25
+ "y": 100,
26
+ "wires": [
27
+ [
28
+ "uc8159_card"
29
+ ]
30
+ ]
31
+ },
32
+ {
33
+ "id": "uc8159_card",
34
+ "type": "function",
35
+ "z": "uc8159_tab",
36
+ "name": "wake and build status card",
37
+ "func": "const out = [\n { payload: { wake: true } },\n { payload: { clear: 'white' } },\n];\nconst colours = ['black', 'white', 'green', 'blue', 'red', 'yellow', 'orange'];\ncolours.forEach((c, i) => out.push({ payload: { rect: { x: 20 + i * 80, y: 40, w: 80, h: 368, color: c, fill: true } } }));\nout.push({ payload: { rect: { x: 4, y: 4, w: 592, h: 440, color: 'black', fill: false } } });\nout.push({ payload: { show: true } });\nreturn [out];",
38
+ "outputs": 1,
39
+ "x": 340,
40
+ "y": 100,
41
+ "wires": [
42
+ [
43
+ "uc8159_node"
44
+ ]
45
+ ]
46
+ },
47
+ {
48
+ "id": "uc8159_node",
49
+ "type": "periph-uc8159",
50
+ "z": "uc8159_tab",
51
+ "name": "",
52
+ "spiBus": "0",
53
+ "spiDevice": "0",
54
+ "gpioChip": "0",
55
+ "dcPin": "25",
56
+ "resPin": "17",
57
+ "busyPin": "24",
58
+ "wireMode": "simplex",
59
+ "width": "400",
60
+ "height": "300",
61
+ "busyTimeout": "30000",
62
+ "autoShow": false,
63
+ "x": 590,
64
+ "y": 100,
65
+ "wires": [
66
+ [
67
+ "uc8159_updated"
68
+ ]
69
+ ]
70
+ },
71
+ {
72
+ "id": "uc8159_updated",
73
+ "type": "switch",
74
+ "z": "uc8159_tab",
75
+ "name": "updated?",
76
+ "property": "payload.updated",
77
+ "propertyType": "msg",
78
+ "rules": [
79
+ {
80
+ "t": "true"
81
+ }
82
+ ],
83
+ "checkall": "true",
84
+ "outputs": 1,
85
+ "x": 780,
86
+ "y": 100,
87
+ "wires": [
88
+ [
89
+ "uc8159_sleep"
90
+ ]
91
+ ]
92
+ },
93
+ {
94
+ "id": "uc8159_sleep",
95
+ "type": "change",
96
+ "z": "uc8159_tab",
97
+ "name": "sleep",
98
+ "rules": [
99
+ {
100
+ "t": "set",
101
+ "p": "payload",
102
+ "pt": "msg",
103
+ "to": "{\"sleep\":true}",
104
+ "tot": "json"
105
+ }
106
+ ],
107
+ "x": 930,
108
+ "y": 100,
109
+ "wires": [
110
+ [
111
+ "uc8159_node"
112
+ ]
113
+ ]
114
+ }
115
+ ]
@@ -0,0 +1,115 @@
1
+ [
2
+ {
3
+ "id": "uc8276c_tab",
4
+ "type": "tab",
5
+ "label": "UC8276C status card",
6
+ "disabled": false,
7
+ "info": "Every 10 minutes: wake the panel, draw a status card (red header bar, black border, bar chart) and refresh it, then put the controller into deep sleep once the node reports { updated: true }. The refresh blocks the node for about 17 s. Needs a Waveshare 4.2inch e-Paper (B) on SPI0 with DC = GPIO25, RST = GPIO17, BUSY = GPIO24."
8
+ },
9
+ {
10
+ "id": "uc8276c_inject",
11
+ "type": "inject",
12
+ "z": "uc8276c_tab",
13
+ "name": "every 10 min",
14
+ "props": [
15
+ {
16
+ "p": "payload"
17
+ }
18
+ ],
19
+ "repeat": "600",
20
+ "once": true,
21
+ "onceDelay": "1",
22
+ "payload": "{}",
23
+ "payloadType": "json",
24
+ "x": 130,
25
+ "y": 100,
26
+ "wires": [
27
+ [
28
+ "uc8276c_card"
29
+ ]
30
+ ]
31
+ },
32
+ {
33
+ "id": "uc8276c_card",
34
+ "type": "function",
35
+ "z": "uc8276c_tab",
36
+ "name": "wake and build status card",
37
+ "func": "const values = [30, 55, 80, 45, 120, 90, 60, 100];\nconst peak = Math.max(...values);\nconst out = [\n { payload: { wake: true } },\n { payload: { clear: 'white' } },\n { payload: { rect: { x: 4, y: 4, w: 392, h: 292, color: 'black', fill: false } } },\n { payload: { rect: { x: 5, y: 5, w: 390, h: 40, color: 'red', fill: true } } },\n { payload: { line: { x0: 30, y0: 270, x1: 370, y1: 270, color: 'black' } } },\n { payload: { line: { x0: 30, y0: 70, x1: 30, y1: 270, color: 'black' } } },\n];\nvalues.forEach((v, i) => out.push({ payload: { rect: { x: 45 + i * 40, y: 270 - v, w: 28, h: v, color: v === peak ? 'red' : 'black', fill: true } } }));\nout.push({ payload: { show: true } });\nreturn [out];",
38
+ "outputs": 1,
39
+ "x": 340,
40
+ "y": 100,
41
+ "wires": [
42
+ [
43
+ "uc8276c_node"
44
+ ]
45
+ ]
46
+ },
47
+ {
48
+ "id": "uc8276c_node",
49
+ "type": "periph-uc8276c",
50
+ "z": "uc8276c_tab",
51
+ "name": "",
52
+ "spiBus": "0",
53
+ "spiDevice": "0",
54
+ "gpioChip": "0",
55
+ "dcPin": "25",
56
+ "resPin": "17",
57
+ "busyPin": "24",
58
+ "wireMode": "simplex",
59
+ "width": "400",
60
+ "height": "300",
61
+ "busyTimeout": "30000",
62
+ "autoShow": false,
63
+ "x": 590,
64
+ "y": 100,
65
+ "wires": [
66
+ [
67
+ "uc8276c_updated"
68
+ ]
69
+ ]
70
+ },
71
+ {
72
+ "id": "uc8276c_updated",
73
+ "type": "switch",
74
+ "z": "uc8276c_tab",
75
+ "name": "updated?",
76
+ "property": "payload.updated",
77
+ "propertyType": "msg",
78
+ "rules": [
79
+ {
80
+ "t": "true"
81
+ }
82
+ ],
83
+ "checkall": "true",
84
+ "outputs": 1,
85
+ "x": 780,
86
+ "y": 100,
87
+ "wires": [
88
+ [
89
+ "uc8276c_sleep"
90
+ ]
91
+ ]
92
+ },
93
+ {
94
+ "id": "uc8276c_sleep",
95
+ "type": "change",
96
+ "z": "uc8276c_tab",
97
+ "name": "sleep",
98
+ "rules": [
99
+ {
100
+ "t": "set",
101
+ "p": "payload",
102
+ "pt": "msg",
103
+ "to": "{\"sleep\":true}",
104
+ "tot": "json"
105
+ }
106
+ ],
107
+ "x": 930,
108
+ "y": 100,
109
+ "wires": [
110
+ [
111
+ "uc8276c_node"
112
+ ]
113
+ ]
114
+ }
115
+ ]