node-red-contrib-periph-adc-dac 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.
Files changed (81) hide show
  1. package/README.md +44 -26
  2. package/examples/ad5243/demo.json +11 -5
  3. package/examples/ad5248/demo.json +1 -1
  4. package/examples/ad5251/demo.json +11 -5
  5. package/examples/ad5252/demo.json +11 -5
  6. package/examples/ad7705/demo.json +1 -1
  7. package/examples/ad7706/demo.json +1 -1
  8. package/examples/ads1013/demo.json +1 -76
  9. package/examples/ads1014/demo.json +1 -77
  10. package/examples/ads1113/demo.json +10 -4
  11. package/examples/ads1114/demo.json +10 -4
  12. package/examples/ads1115/demo.json +11 -5
  13. package/examples/ads7828/demo.json +12 -6
  14. package/examples/cat5171/demo.json +10 -4
  15. package/examples/cs43l22/demo.json +13 -7
  16. package/examples/ds1881/demo.json +12 -6
  17. package/examples/ds3502/demo.json +11 -5
  18. package/examples/es8311/demo.json +1 -1
  19. package/examples/hx710a/demo.json +38 -10
  20. package/examples/hx710b/demo.json +56 -15
  21. package/examples/hx711/demo.json +32 -9
  22. package/examples/hy3131/demo.json +1 -1
  23. package/examples/mcp3422/demo.json +12 -6
  24. package/examples/mcp4725/demo.json +1 -1
  25. package/examples/mcp4728/demo.json +5 -5
  26. package/examples/mcp4xxx/demo.json +1 -1
  27. package/examples/pcf8591/demo.json +30 -8
  28. package/nodes/ad5243/ad5243.html +46 -20
  29. package/nodes/ad5243/ad5243.js +28 -22
  30. package/nodes/ad5248/ad5248.html +3 -3
  31. package/nodes/ad5248/ad5248.js +1 -1
  32. package/nodes/ad5251/ad5251.html +45 -19
  33. package/nodes/ad5251/ad5251.js +29 -23
  34. package/nodes/ad5252/ad5252.html +45 -19
  35. package/nodes/ad5252/ad5252.js +29 -23
  36. package/nodes/ad7705/ad7705.html +3 -3
  37. package/nodes/ad7705/ad7705.js +1 -1
  38. package/nodes/ad7706/ad7706.html +3 -3
  39. package/nodes/ad7706/ad7706.js +1 -1
  40. package/nodes/ads1013/ads1013.html +44 -18
  41. package/nodes/ads1013/ads1013.js +22 -16
  42. package/nodes/ads1014/ads1014.html +46 -20
  43. package/nodes/ads1014/ads1014.js +22 -16
  44. package/nodes/ads1113/ads1113.html +44 -18
  45. package/nodes/ads1113/ads1113.js +17 -8
  46. package/nodes/ads1114/ads1114.html +46 -20
  47. package/nodes/ads1114/ads1114.js +17 -8
  48. package/nodes/ads1115/ads1115.html +48 -22
  49. package/nodes/ads1115/ads1115.js +17 -8
  50. package/nodes/ads7828/ads7828.html +47 -21
  51. package/nodes/ads7828/ads7828.js +23 -17
  52. package/nodes/cat5171/cat5171.html +46 -20
  53. package/nodes/cat5171/cat5171.js +28 -22
  54. package/nodes/cs43l22/cs43l22.html +48 -22
  55. package/nodes/cs43l22/cs43l22.js +29 -22
  56. package/nodes/ds1881/ds1881.html +48 -22
  57. package/nodes/ds1881/ds1881.js +34 -27
  58. package/nodes/ds3502/ds3502.html +46 -20
  59. package/nodes/ds3502/ds3502.js +25 -19
  60. package/nodes/es8311/es8311.html +3 -3
  61. package/nodes/es8311/es8311.js +1 -1
  62. package/nodes/hx710a/hx710a.html +48 -22
  63. package/nodes/hx710a/hx710a.js +18 -13
  64. package/nodes/hx710b/hx710b.html +48 -22
  65. package/nodes/hx710b/hx710b.js +18 -13
  66. package/nodes/hx711/hx711.html +48 -22
  67. package/nodes/hx711/hx711.js +17 -12
  68. package/nodes/hy3131/hy3131.html +3 -3
  69. package/nodes/hy3131/hy3131.js +1 -1
  70. package/nodes/mcp3422/mcp3422.html +46 -20
  71. package/nodes/mcp3422/mcp3422.js +28 -22
  72. package/nodes/mcp4725/mcp4725.html +3 -3
  73. package/nodes/mcp4725/mcp4725.js +1 -1
  74. package/nodes/mcp4728/mcp4728.html +3 -3
  75. package/nodes/mcp4728/mcp4728.js +1 -1
  76. package/nodes/mcp4xxx/mcp4xxx.html +3 -3
  77. package/nodes/mcp4xxx/mcp4xxx.js +1 -1
  78. package/nodes/pcf8591/pcf8591.html +37 -11
  79. package/nodes/pcf8591/pcf8591.js +16 -7
  80. package/package.json +1 -1
  81. package/index.js +0 -11
package/README.md CHANGED
@@ -16,40 +16,58 @@ npm install node-red-contrib-periph-adc-dac
16
16
 
17
17
  | Node | Kind | Description |
18
18
  |------|------|-------------|
19
- | `periph-ad5243` | input | Sets and reads the two 256-position wipers of an AD5243 dual I²C digital potentiometer. Wiper values are volatile: both channels power up at midscale (128). |
19
+ | `ad5243-device` | config | Bus configuration for an AD5243 |
20
+ | `ad5243` | input | Sets and reads the two 256-position wipers of an AD5243 dual I²C digital potentiometer. Wiper values are volatile: both channels power up at midscale (128). |
20
21
  | `ad5248-device` | config | I²C bus and address for an AD5248 |
21
- | `periph-ad5248` | input | Sets or reads the two 256-position wipers of an AD5248 dual digital rheostat over I²C. The device is configured via an ad5248-device config node. |
22
- | `periph-ad5251` | input | Sets and reads the two 64-position wipers of an AD5251 dual I²C digital potentiometer. Both channels power up from their stored EEMEM value (midscale, 32, until a value is stored). |
23
- | `periph-ad5252` | input | Sets and reads the two 256-position wipers of an AD5252 dual I²C digital potentiometer. Both channels power up from their stored EEMEM value (midscale, 128, until a value is stored). |
22
+ | `ad5248` | input | Sets or reads the two 256-position wipers of an AD5248 dual digital rheostat over I²C. The device is configured via an ad5248-device config node. |
23
+ | `ad5251-device` | config | I²C bus and address for an AD5251 |
24
+ | `ad5251` | input | Sets and reads the two 64-position wipers of an AD5251 dual I²C digital potentiometer. Both channels power up from their stored EEMEM value (midscale, 32, until a value is stored). |
25
+ | `ad5252-device` | config | I²C bus and address for an AD5252 |
26
+ | `ad5252` | input | Sets and reads the two 256-position wipers of an AD5252 dual I²C digital potentiometer. Both channels power up from their stored EEMEM value (midscale, 128, until a value is stored). |
24
27
  | `ad7705-device` | config | Bus configuration for an AD7705 |
25
- | `periph-ad7705` | input | Reads voltage from a 2-channel, 16-bit sigma-delta AD7705 ADC over SPI. The driver uses the chip's two-phase register-access protocol and polls DRDY over SPI, so only SCLK/DIN/DOUT/CS are needed (no dedicated DRDY GPIO). |
28
+ | `ad7705` | input | Reads voltage from a 2-channel, 16-bit sigma-delta AD7705 ADC over SPI. The driver uses the chip's two-phase register-access protocol and polls DRDY over SPI, so only SCLK/DIN/DOUT/CS are needed (no dedicated DRDY GPIO). |
26
29
  | `ad7706-device` | config | Bus configuration for an AD7706 |
27
- | `periph-ad7706` | input | Reads voltage from a 3-channel, 16-bit sigma-delta AD7706 ADC over SPI. The driver uses the chip's two-phase register-access protocol and polls DRDY over SPI, so only SCLK/DIN/DOUT/CS are needed (no dedicated DRDY GPIO). All three channels share a single COMMON reference pin. |
28
- | `periph-ads1013` | input | Reads the voltage AIN0 − AIN1 from an ADS1013 12-bit ADC over I²C using a single-shot conversion. |
29
- | `periph-ads1014` | input | Reads the voltage AIN0 − AIN1 from an ADS1014 12-bit ADC over I²C using a single-shot conversion. |
30
- | `periph-ads1113` | input | Reads the ADS1113 16-bit ΔΣ ADC (one differential input (AIN0 − AIN1), fixed ±2.048 V) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
31
- | `periph-ads1114` | input | Reads the ADS1114 16-bit ΔΣ ADC (one differential input (AIN0 − AIN1) with programmable gain) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
32
- | `periph-ads1115` | input | Reads the ADS1115 16-bit ΔΣ ADC (four single-ended or two differential inputs with programmable gain) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
33
- | `periph-ads7828` | input | Reads the 12-bit, 8-channel ADS7828 ADC over I²C as eight single-ended inputs or four differential pairs. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the A1/A0 straps. With the internal 2.5 V reference the REFIN/REFOUT pin must be decoupled with 0.1 µF and nothing else may drive it. |
34
- | `periph-cat5171` | input | Sets and reads the 256-position wiper of a CAT5171 I²C digital potentiometer. The wiper is volatile: it powers up at midscale (128). |
35
- | `periph-cs43l22` | input | Controls a CS43L22 stereo DAC with headphone and speaker amplifiers over its I²C control port. The audio stream (I²S: MCLK, SCLK, LRCK, SDIN) comes from the board and is not handled by this node. Send { start: true } only after MCLK is running. |
36
- | `periph-ds1881` | input | Controls the two audio log-taper channels of a DS1881 dual digital potentiometer. Attenuation is in dB (0 dB = wiper at H); position 63 (Option 1) or 33 (Option 2) is mute. By default the wipers are volatile and power up at mute. |
37
- | `periph-ds3502` | input | Sets and reads the 128-position wiper of a DS3502 high-voltage I²C digital potentiometer. Wiper writes go to SRAM only (MODE = 1) and never wear the EEPROM; the wiper powers up at the stored Initial Value Register position (factory default 64, midscale). |
30
+ | `ad7706` | input | Reads voltage from a 3-channel, 16-bit sigma-delta AD7706 ADC over SPI. The driver uses the chip's two-phase register-access protocol and polls DRDY over SPI, so only SCLK/DIN/DOUT/CS are needed (no dedicated DRDY GPIO). All three channels share a single COMMON reference pin. |
31
+ | `ads1013-device` | config | I²C bus and address for an ADS1013 |
32
+ | `ads1013` | input | Reads the voltage AIN0 − AIN1 from an ADS1013 12-bit ADC over I²C using a single-shot conversion. |
33
+ | `ads1014-device` | config | I²C bus and address for an ADS1014 |
34
+ | `ads1014` | input | Reads the voltage AIN0 − AIN1 from an ADS1014 12-bit ADC over I²C using a single-shot conversion. |
35
+ | `ads1113-device` | config | I²C bus and address for an ADS1113 |
36
+ | `ads1113` | input | Reads the ADS1113 16-bit ΔΣ ADC (one differential input (AIN0 − AIN1), fixed ±2.048 V) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
37
+ | `ads1114-device` | config | I²C bus and address for an ADS1114 |
38
+ | `ads1114` | input | Reads the ADS1114 16-bit ΔΣ ADC (one differential input (AIN0 − AIN1) with programmable gain) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
39
+ | `ads1115-device` | config | I²C bus and address for an ADS1115 |
40
+ | `ads1115` | input | Reads the ADS1115 16-bit ΔΣ ADC (four single-ended or two differential inputs with programmable gain) over I²C. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the ADDR strap. |
41
+ | `ads7828-device` | config | I²C bus and address for an ADS7828 |
42
+ | `ads7828` | input | Reads the 12-bit, 8-channel ADS7828 ADC over I²C as eight single-ended inputs or four differential pairs. Default address is 0x48 ; 0x48 – 0x4B are valid depending on the A1/A0 straps. With the internal 2.5 V reference the REFIN/REFOUT pin must be decoupled with 0.1 µF and nothing else may drive it. |
43
+ | `cat5171-device` | config | I²C bus and address for a CAT5171 |
44
+ | `cat5171` | input | Sets and reads the 256-position wiper of a CAT5171 I²C digital potentiometer. The wiper is volatile: it powers up at midscale (128). |
45
+ | `cs43l22-device` | config | I²C bus and address for a CS43L22 |
46
+ | `cs43l22` | input | Controls a CS43L22 stereo DAC with headphone and speaker amplifiers over its I²C control port. The audio stream (I²S: MCLK, SCLK, LRCK, SDIN) comes from the board and is not handled by this node. Send { start: true } only after MCLK is running. |
47
+ | `ds1881-device` | config | I²C bus and address for a DS1881 |
48
+ | `ds1881` | input | Controls the two audio log-taper channels of a DS1881 dual digital potentiometer. Attenuation is in dB (0 dB = wiper at H); position 63 (Option 1) or 33 (Option 2) is mute. By default the wipers are volatile and power up at mute. |
49
+ | `ds3502-device` | config | I²C bus and address for a DS3502 |
50
+ | `ds3502` | input | Sets and reads the 128-position wiper of a DS3502 high-voltage I²C digital potentiometer. Wiper writes go to SRAM only (MODE = 1) and never wear the EEPROM; the wiper powers up at the stored Initial Value Register position (factory default 64, midscale). |
38
51
  | `es8311-device` | config | I²C bus and address for an ES8311 |
39
- | `periph-es8311` | input | Controls an ES8311 low-power mono audio codec over its I²C control port. The audio stream itself (I²S) is not handled by this node. |
40
- | `periph-hx710a` | input | Reads weight from an HX710A 24-bit ADC connected to a load cell via two GPIO pins. Also exposes the chip's on-chip temperature sensor as a raw ADC code. |
41
- | `periph-hx710b` | input | Reads weight from an HX710B 24-bit ADC connected to a load cell via two GPIO pins. Also exposes the chip's DVDD-AVDD supply-voltage-difference channel as a raw ADC code for battery-monitoring applications. |
42
- | `periph-hx711` | input | Reads weight from an HX711 24-bit ADC connected to a load cell via two GPIO pins. |
52
+ | `es8311` | input | Controls an ES8311 low-power mono audio codec over its I²C control port. The audio stream itself (I²S) is not handled by this node. |
53
+ | `hx710a-device` | config | Bus configuration for a HX710A |
54
+ | `hx710a` | input | Reads weight from an HX710A 24-bit ADC connected to a load cell via two GPIO pins. Also exposes the chip's on-chip temperature sensor as a raw ADC code. |
55
+ | `hx710b-device` | config | Bus configuration for a HX710B |
56
+ | `hx710b` | input | Reads weight from an HX710B 24-bit ADC connected to a load cell via two GPIO pins. Also exposes the chip's DVDD-AVDD supply-voltage-difference channel as a raw ADC code for battery-monitoring applications. |
57
+ | `hx711-device` | config | Bus configuration for a HX711 |
58
+ | `hx711` | input | Reads weight from an HX711 24-bit ADC connected to a load cell via two GPIO pins. |
43
59
  | `hy3131-device` | config | Bus configuration for a HY3131 |
44
- | `periph-hy3131` | input | Reads the AD1 differential input (PB2 vs AGND) of an HY3131 DMM analog front end over SPI. Data-ready is polled via the INTF register, so only CK/DI/DO/CS are needed. |
45
- | `periph-mcp3422` | input | Reads the two differential inputs of a MCP3422 18-bit delta-sigma ADC (I²C) with a one-shot conversion per channel. Full scale is ±2.048 V / gain; the LSB is 2·2.048 V / 2 bits / gain. |
60
+ | `hy3131` | input | Reads the AD1 differential input (PB2 vs AGND) of an HY3131 DMM analog front end over SPI. Data-ready is polled via the INTF register, so only CK/DI/DO/CS are needed. |
61
+ | `mcp3422-device` | config | I²C bus and address for a MCP3422 |
62
+ | `mcp3422` | input | Reads the two differential inputs of a MCP3422 18-bit delta-sigma ADC (I²C) with a one-shot conversion per channel. Full scale is ±2.048 V / gain; the LSB is 2·2.048 V / 2 bits / gain. |
46
63
  | `mcp4725-device` | config | I²C bus and address for a MCP4725 |
47
- | `periph-mcp4725` | output | Sets the output voltage of an MCP4725 12-bit DAC over I²C. |
64
+ | `mcp4725` | output | Sets the output voltage of an MCP4725 12-bit DAC over I²C. |
48
65
  | `mcp4728-device` | config | I²C bus and address for a MCP4728 |
49
- | `periph-mcp4728` | output | Sets the output voltage of one channel (A–D) of an MCP4728 quad-channel 12-bit DAC over I²C. |
66
+ | `mcp4728` | output | Sets the output voltage of one channel (A–D) of an MCP4728 quad-channel 12-bit DAC over I²C. |
50
67
  | `mcp4xxx-device` | config | I²C bus and address for a MCP4XXX |
51
- | `periph-mcp4xxx` | input | Sets or reads the volatile wiper(s) of an MCP4XXX I²C digital potentiometer / rheostat (MCP4531 … MCP4662: 7 / 8-bit, one or two networks, volatile or non-volatile). The device is configured via an mcp4xxx-device config node. |
52
- | `periph-pcf8591` | input | Reads the four analog inputs of a PCF8591 8-bit ADC/DAC over I²C. Default address is 0x48 ; any address in the range 0x48 – 0x4F is valid depending on the A0/A1/A2 pin states. |
68
+ | `mcp4xxx` | input | Sets or reads the volatile wiper(s) of an MCP4XXX I²C digital potentiometer / rheostat (MCP4531 … MCP4662: 7 / 8-bit, one or two networks, volatile or non-volatile). The device is configured via an mcp4xxx-device config node. |
69
+ | `pcf8591-device` | config | I²C bus and address for a PCF8591 |
70
+ | `pcf8591` | input | Reads the four analog inputs of a PCF8591 8-bit ADC/DAC over I²C. Default address is 0x48 ; any address in the range 0x48 – 0x4F is valid depending on the A0/A1/A2 pin states. |
53
71
 
54
72
  ## Links
55
73
 
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "AD5243 Wiper Sweep Demo",
6
6
  "disabled": false,
7
- "info": "Two scenarios on one AD5243 dual digital potentiometer. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 16, ... 240), producing the staircase; the periph-ad5243 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 2.2 kOhm W-B resistance once and a third reads back both channels."
7
+ "info": "Two scenarios on one AD5243 dual digital potentiometer. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 16, ... 240), producing the staircase; the ad5243 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 2.2 kOhm W-B resistance once and a third reads back both channels."
8
8
  },
9
9
  {
10
10
  "id": "inj-sweep",
@@ -83,12 +83,17 @@
83
83
  ]
84
84
  },
85
85
  {
86
- "id": "ad5243-node",
87
- "type": "periph-ad5243",
86
+ "id": "ad5243-device-1",
87
+ "type": "ad5243-device",
88
88
  "name": "AD5243",
89
89
  "bus": "1",
90
90
  "rab": "10000",
91
- "rwiper": "160",
91
+ "rwiper": "160"
92
+ },
93
+ {
94
+ "id": "ad5243-node",
95
+ "type": "ad5243",
96
+ "name": "AD5243",
92
97
  "z": "tab-ad5243-demo",
93
98
  "x": 560,
94
99
  "y": 140,
@@ -96,7 +101,8 @@
96
101
  [
97
102
  "dbg-ad5243"
98
103
  ]
99
- ]
104
+ ],
105
+ "device": "ad5243-device-1"
100
106
  },
101
107
  {
102
108
  "id": "dbg-ad5243",
@@ -95,7 +95,7 @@
95
95
  },
96
96
  {
97
97
  "id": "ad5248",
98
- "type": "periph-ad5248",
98
+ "type": "ad5248",
99
99
  "name": "AD5248",
100
100
  "device": "cfg-ad5248",
101
101
  "z": "tab-ad5248-demo",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "AD5251 Wiper Sweep Demo",
6
6
  "disabled": false,
7
- "info": "Two scenarios on one AD5251 dual digital potentiometer with nonvolatile memory. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 4, ... 60), producing the staircase; the periph-ad5251 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 20 kOhm W-B resistance once and a third reads back both channels."
7
+ "info": "Two scenarios on one AD5251 dual digital potentiometer with nonvolatile memory. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 4, ... 60), producing the staircase; the ad5251 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 20 kOhm W-B resistance once and a third reads back both channels."
8
8
  },
9
9
  {
10
10
  "id": "inj-sweep",
@@ -83,13 +83,18 @@
83
83
  ]
84
84
  },
85
85
  {
86
- "id": "ad5251-node",
87
- "type": "periph-ad5251",
86
+ "id": "ad5251-device-1",
87
+ "type": "ad5251-device",
88
88
  "name": "AD5251",
89
89
  "bus": "1",
90
90
  "rab": "50000",
91
- "address": "0x2C",
92
91
  "rwiper": "75",
92
+ "address": "0x2C"
93
+ },
94
+ {
95
+ "id": "ad5251-node",
96
+ "type": "ad5251",
97
+ "name": "AD5251",
93
98
  "z": "tab-ad5251-demo",
94
99
  "x": 560,
95
100
  "y": 140,
@@ -97,7 +102,8 @@
97
102
  [
98
103
  "dbg-ad5251"
99
104
  ]
100
- ]
105
+ ],
106
+ "device": "ad5251-device-1"
101
107
  },
102
108
  {
103
109
  "id": "dbg-ad5251",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "AD5252 Wiper Sweep Demo",
6
6
  "disabled": false,
7
- "info": "Two scenarios on one AD5252 dual digital potentiometer with nonvolatile memory. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 16, ... 240), producing the staircase; the periph-ad5252 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 2.2 kOhm W-B resistance once and a third reads back both channels."
7
+ "info": "Two scenarios on one AD5252 dual digital potentiometer with nonvolatile memory. An Inject node ticks every 500 ms into a Function node that sweeps channel 0 through 16 evenly spaced wiper codes (0, 16, ... 240), producing the staircase; the ad5252 node returns {channel, code, resistance} which a Debug node shows. A second Inject node sets channel 1 to a 2.2 kOhm W-B resistance once and a third reads back both channels."
8
8
  },
9
9
  {
10
10
  "id": "inj-sweep",
@@ -83,13 +83,18 @@
83
83
  ]
84
84
  },
85
85
  {
86
- "id": "ad5252-node",
87
- "type": "periph-ad5252",
86
+ "id": "ad5252-device-1",
87
+ "type": "ad5252-device",
88
88
  "name": "AD5252",
89
89
  "bus": "1",
90
90
  "rab": "10000",
91
- "address": "0x2C",
92
91
  "rwiper": "75",
92
+ "address": "0x2C"
93
+ },
94
+ {
95
+ "id": "ad5252-node",
96
+ "type": "ad5252",
97
+ "name": "AD5252",
93
98
  "z": "tab-ad5252-demo",
94
99
  "x": 560,
95
100
  "y": 140,
@@ -97,7 +102,8 @@
97
102
  [
98
103
  "dbg-ad5252"
99
104
  ]
100
- ]
105
+ ],
106
+ "device": "ad5252-device-1"
101
107
  },
102
108
  {
103
109
  "id": "dbg-ad5252",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  {
51
51
  "id": "ad7705",
52
- "type": "periph-ad7705",
52
+ "type": "ad7705",
53
53
  "name": "AD7705",
54
54
  "device": "cfg-ad7705",
55
55
  "z": "tab-ad7705-demo",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  {
51
51
  "id": "ad7706",
52
- "type": "periph-ad7706",
52
+ "type": "ad7706",
53
53
  "name": "AD7706",
54
54
  "device": "cfg-ad7706",
55
55
  "z": "tab-ad7706-demo",
@@ -1,76 +1 @@
1
- [
2
- {
3
- "id": "tab-ads1013-demo",
4
- "type": "tab",
5
- "label": "ADS1013 Battery Voltage Demo",
6
- "disabled": false,
7
- "info": "An Inject node fires every second, triggering the periph-ads1013 node to run a single-shot conversion at 128 SPS. The cell voltage is wired through a 2:1 resistor divider to AIN0 (AIN1 to GND); a Function node multiplies the divider voltage by 2 to obtain the battery voltage and the Debug sidebar shows it in volts."
8
- },
9
- {
10
- "id": "inj-read",
11
- "type": "inject",
12
- "name": "Read (1 s)",
13
- "topic": "",
14
- "payload": "",
15
- "payloadType": "date",
16
- "repeat": "1",
17
- "crontab": "",
18
- "once": true,
19
- "onceDelay": 1,
20
- "z": "tab-ads1013-demo",
21
- "x": 160,
22
- "y": 100,
23
- "wires": [
24
- [
25
- "ads1013-node"
26
- ]
27
- ]
28
- },
29
- {
30
- "id": "ads1013-node",
31
- "type": "periph-ads1013",
32
- "bus": "1",
33
- "address": "0x48",
34
- "z": "tab-ads1013-demo",
35
- "x": 380,
36
- "y": 100,
37
- "wires": [
38
- [
39
- "fn-scale"
40
- ]
41
- ],
42
- "name": "Battery ADS1013",
43
- "dataRate": "0"
44
- },
45
- {
46
- "id": "fn-scale",
47
- "type": "function",
48
- "name": "scale divider to battery voltage",
49
- "func": "const v = msg.payload.voltage * 2; // 2:1 divider\nmsg.payload = `battery ${v.toFixed(3)} V (raw ${msg.payload.raw})`;\nreturn msg;",
50
- "outputs": 1,
51
- "noerr": 0,
52
- "z": "tab-ads1013-demo",
53
- "x": 620,
54
- "y": 100,
55
- "wires": [
56
- [
57
- "debug-out"
58
- ]
59
- ]
60
- },
61
- {
62
- "id": "debug-out",
63
- "type": "debug",
64
- "name": "Battery voltage",
65
- "active": true,
66
- "tosidebar": true,
67
- "console": false,
68
- "tostatus": false,
69
- "complete": "payload",
70
- "targetType": "msg",
71
- "z": "tab-ads1013-demo",
72
- "x": 860,
73
- "y": 100,
74
- "wires": []
75
- }
76
- ]
1
+ [{"id": "tab-ads1013-demo", "type": "tab", "label": "ADS1013 Battery Voltage Demo", "disabled": false, "info": "An Inject node fires every second, triggering the ads1013 node to run a single-shot conversion at 128 SPS. The cell voltage is wired through a 2:1 resistor divider to AIN0 (AIN1 to GND); a Function node multiplies the divider voltage by 2 to obtain the battery voltage and the Debug sidebar shows it in volts."}, {"id": "inj-read", "type": "inject", "name": "Read (1 s)", "topic": "", "payload": "", "payloadType": "date", "repeat": "1", "crontab": "", "once": true, "onceDelay": 1, "z": "tab-ads1013-demo", "x": 160, "y": 100, "wires": [["ads1013-node"]]}, {"id": "ads1013-device-1", "type": "ads1013-device", "name": "ADS1013", "bus": "1", "address": "0x48", "dataRate": "0"}, {"id": "ads1013-node", "type": "ads1013", "z": "tab-ads1013-demo", "x": 380, "y": 100, "wires": [["fn-scale"]], "name": "Battery ADS1013", "device": "ads1013-device-1"}, {"id": "fn-scale", "type": "function", "name": "scale divider to battery voltage", "func": "const v = msg.payload.voltage * 2; // 2:1 divider\nmsg.payload = `battery ${v.toFixed(3)} V (raw ${msg.payload.raw})`;\nreturn msg;", "outputs": 1, "noerr": 0, "z": "tab-ads1013-demo", "x": 620, "y": 100, "wires": [["debug-out"]]}, {"id": "debug-out", "type": "debug", "name": "Battery voltage", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "z": "tab-ads1013-demo", "x": 860, "y": 100, "wires": []}]
@@ -1,77 +1 @@
1
- [
2
- {
3
- "id": "tab-ads1014-demo",
4
- "type": "tab",
5
- "label": "ADS1014 Shunt Current Demo",
6
- "disabled": false,
7
- "info": "An Inject node fires every second, triggering the periph-ads1014 node (gain ±0.256 V, 250 SPS) to read the voltage across a 0.1 ohm shunt. A Function node converts the shunt voltage to a load current (V / 0.1 ohm) and flags an over-current condition above 1 A in the Debug sidebar."
8
- },
9
- {
10
- "id": "inj-read",
11
- "type": "inject",
12
- "name": "Read (1 s)",
13
- "topic": "",
14
- "payload": "",
15
- "payloadType": "date",
16
- "repeat": "1",
17
- "crontab": "",
18
- "once": true,
19
- "onceDelay": 1,
20
- "z": "tab-ads1014-demo",
21
- "x": 160,
22
- "y": 100,
23
- "wires": [
24
- [
25
- "ads1014-node"
26
- ]
27
- ]
28
- },
29
- {
30
- "id": "ads1014-node",
31
- "type": "periph-ads1014",
32
- "bus": "1",
33
- "address": "0x48",
34
- "z": "tab-ads1014-demo",
35
- "x": 380,
36
- "y": 100,
37
- "wires": [
38
- [
39
- "fn-scale"
40
- ]
41
- ],
42
- "name": "Shunt ADS1014",
43
- "gain": "5",
44
- "dataRate": "1"
45
- },
46
- {
47
- "id": "fn-scale",
48
- "type": "function",
49
- "name": "shunt voltage to current",
50
- "func": "const amps = msg.payload.voltage / 0.1; // 0.1 ohm shunt\nmsg.payload = `${amps.toFixed(2)} A` + (amps > 1.0 ? ' OVER-CURRENT' : '');\nreturn msg;",
51
- "outputs": 1,
52
- "noerr": 0,
53
- "z": "tab-ads1014-demo",
54
- "x": 620,
55
- "y": 100,
56
- "wires": [
57
- [
58
- "debug-out"
59
- ]
60
- ]
61
- },
62
- {
63
- "id": "debug-out",
64
- "type": "debug",
65
- "name": "Load current",
66
- "active": true,
67
- "tosidebar": true,
68
- "console": false,
69
- "tostatus": false,
70
- "complete": "payload",
71
- "targetType": "msg",
72
- "z": "tab-ads1014-demo",
73
- "x": 860,
74
- "y": 100,
75
- "wires": []
76
- }
77
- ]
1
+ [{"id": "tab-ads1014-demo", "type": "tab", "label": "ADS1014 Shunt Current Demo", "disabled": false, "info": "An Inject node fires every second, triggering the ads1014 node (gain ±0.256 V, 250 SPS) to read the voltage across a 0.1 ohm shunt. A Function node converts the shunt voltage to a load current (V / 0.1 ohm) and flags an over-current condition above 1 A in the Debug sidebar."}, {"id": "inj-read", "type": "inject", "name": "Read (1 s)", "topic": "", "payload": "", "payloadType": "date", "repeat": "1", "crontab": "", "once": true, "onceDelay": 1, "z": "tab-ads1014-demo", "x": 160, "y": 100, "wires": [["ads1014-node"]]}, {"id": "ads1014-device-1", "type": "ads1014-device", "name": "ADS1014", "gain": "5", "bus": "1", "dataRate": "1", "address": "0x48"}, {"id": "ads1014-node", "type": "ads1014", "z": "tab-ads1014-demo", "x": 380, "y": 100, "wires": [["fn-scale"]], "name": "Shunt ADS1014", "device": "ads1014-device-1"}, {"id": "fn-scale", "type": "function", "name": "shunt voltage to current", "func": "const amps = msg.payload.voltage / 0.1; // 0.1 ohm shunt\nmsg.payload = `${amps.toFixed(2)} A` + (amps > 1.0 ? ' OVER-CURRENT' : '');\nreturn msg;", "outputs": 1, "noerr": 0, "z": "tab-ads1014-demo", "x": 620, "y": 100, "wires": [["debug-out"]]}, {"id": "debug-out", "type": "debug", "name": "Load current", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "z": "tab-ads1014-demo", "x": 860, "y": 100, "wires": []}]
@@ -27,12 +27,17 @@
27
27
  ]
28
28
  },
29
29
  {
30
- "id": "ads1113",
31
- "type": "periph-ads1113",
30
+ "id": "ads1113-device-1",
31
+ "type": "ads1113-device",
32
32
  "name": "ADS1113",
33
33
  "bus": "1",
34
34
  "address": "48",
35
- "dataRate": "4",
35
+ "dataRate": "4"
36
+ },
37
+ {
38
+ "id": "ads1113",
39
+ "type": "ads1113",
40
+ "name": "ADS1113",
36
41
  "z": "tab-ads1113-demo",
37
42
  "x": 380,
38
43
  "y": 100,
@@ -40,7 +45,8 @@
40
45
  [
41
46
  "dbg"
42
47
  ]
43
- ]
48
+ ],
49
+ "device": "ads1113-device-1"
44
50
  },
45
51
  {
46
52
  "id": "dbg",
@@ -27,12 +27,18 @@
27
27
  ]
28
28
  },
29
29
  {
30
- "id": "ads1114",
31
- "type": "periph-ads1114",
30
+ "id": "ads1114-device-1",
31
+ "type": "ads1114-device",
32
32
  "name": "ADS1114",
33
+ "gain": "2",
33
34
  "bus": "1",
34
- "address": "48",
35
35
  "dataRate": "4",
36
+ "address": "48"
37
+ },
38
+ {
39
+ "id": "ads1114",
40
+ "type": "ads1114",
41
+ "name": "ADS1114",
36
42
  "z": "tab-ads1114-demo",
37
43
  "x": 380,
38
44
  "y": 100,
@@ -41,7 +47,7 @@
41
47
  "dbg"
42
48
  ]
43
49
  ],
44
- "gain": "2"
50
+ "device": "ads1114-device-1"
45
51
  },
46
52
  {
47
53
  "id": "dbg",
@@ -27,12 +27,18 @@
27
27
  ]
28
28
  },
29
29
  {
30
- "id": "ads1115",
31
- "type": "periph-ads1115",
30
+ "id": "ads1115-device-1",
31
+ "type": "ads1115-device",
32
32
  "name": "ADS1115",
33
+ "gain": "1",
33
34
  "bus": "1",
34
- "address": "48",
35
35
  "dataRate": "4",
36
+ "address": "48"
37
+ },
38
+ {
39
+ "id": "ads1115",
40
+ "type": "ads1115",
41
+ "name": "ADS1115",
36
42
  "z": "tab-ads1115-demo",
37
43
  "x": 380,
38
44
  "y": 100,
@@ -41,8 +47,8 @@
41
47
  "fn-scale"
42
48
  ]
43
49
  ],
44
- "gain": "1",
45
- "channel": "0"
50
+ "channel": "0",
51
+ "device": "ads1115-device-1"
46
52
  },
47
53
  {
48
54
  "id": "fn-scale",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "ADS7828 Supply Monitor Demo",
6
6
  "disabled": false,
7
- "info": "Eight-channel supply monitor on an ADS7828 with its internal 2.5 V reference. An Inject node ticks every second into the periph-ads7828 node, which scans CH0-CH7 and returns {channels, raw}. A Function node splits the eight voltages into separate messages with topics ch0 ... ch7 and a Debug node prints them. A second Inject node sends msg.differential = \"0-1\" to read a bridge sensor on CH0/CH1 as a differential pair."
7
+ "info": "Eight-channel supply monitor on an ADS7828 with its internal 2.5 V reference. An Inject node ticks every second into the ads7828 node, which scans CH0-CH7 and returns {channels, raw}. A Function node splits the eight voltages into separate messages with topics ch0 ... ch7 and a Debug node prints them. A second Inject node sends msg.differential = \"0-1\" to read a bridge sensor on CH0/CH1 as a differential pair."
8
8
  },
9
9
  {
10
10
  "id": "inj-scan",
@@ -63,13 +63,18 @@
63
63
  ]
64
64
  },
65
65
  {
66
- "id": "ads7828-node",
67
- "type": "periph-ads7828",
66
+ "id": "ads7828-device-1",
67
+ "type": "ads7828-device",
68
68
  "name": "ADS7828",
69
- "bus": "1",
70
69
  "address": "0x48",
71
- "reference": "internal",
70
+ "bus": "1",
72
71
  "vref": "5.0",
72
+ "reference": "internal"
73
+ },
74
+ {
75
+ "id": "ads7828-node",
76
+ "type": "ads7828",
77
+ "name": "ADS7828",
73
78
  "z": "tab-ads7828-demo",
74
79
  "x": 560,
75
80
  "y": 140,
@@ -78,7 +83,8 @@
78
83
  "fn-split",
79
84
  "dbg-raw"
80
85
  ]
81
- ]
86
+ ],
87
+ "device": "ads7828-device-1"
82
88
  },
83
89
  {
84
90
  "id": "fn-split",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "CAT5171 Wiper Sweep Demo",
6
6
  "disabled": false,
7
- "info": "Two scenarios on one CAT5171 digital potentiometer. An Inject node ticks every 500 ms into a Function node that steps the wiper through 16 evenly spaced codes (0, 16, ... 240), producing the staircase; the periph-cat5171 node returns {code, resistance} which a Debug node shows. A second Inject node sets a 22 kOhm W-B resistance once, a third reads back the wiper, and a fourth and fifth toggle shutdown on and off."
7
+ "info": "Two scenarios on one CAT5171 digital potentiometer. An Inject node ticks every 500 ms into a Function node that steps the wiper through 16 evenly spaced codes (0, 16, ... 240), producing the staircase; the cat5171 node returns {code, resistance} which a Debug node shows. A second Inject node sets a 22 kOhm W-B resistance once, a third reads back the wiper, and a fourth and fifth toggle shutdown on and off."
8
8
  },
9
9
  {
10
10
  "id": "inj-sweep",
@@ -123,12 +123,18 @@
123
123
  ]
124
124
  },
125
125
  {
126
- "id": "cat5171-node",
127
- "type": "periph-cat5171",
126
+ "id": "cat5171-device-1",
127
+ "type": "cat5171-device",
128
128
  "name": "CAT5171",
129
129
  "bus": "1",
130
130
  "rab": "100000",
131
131
  "rwiper": "50",
132
+ "address": "0x2C"
133
+ },
134
+ {
135
+ "id": "cat5171-node",
136
+ "type": "cat5171",
137
+ "name": "CAT5171",
132
138
  "z": "tab-cat5171-demo",
133
139
  "x": 560,
134
140
  "y": 140,
@@ -137,7 +143,7 @@
137
143
  "dbg-cat5171"
138
144
  ]
139
145
  ],
140
- "address": "0x2C"
146
+ "device": "cat5171-device-1"
141
147
  },
142
148
  {
143
149
  "id": "dbg-cat5171",
@@ -123,22 +123,28 @@
123
123
  ]
124
124
  },
125
125
  {
126
- "id": "cs43l22-node",
127
- "type": "periph-cs43l22",
128
- "z": "tab-cs43l22-demo",
126
+ "id": "cs43l22-device-1",
127
+ "type": "cs43l22-device",
129
128
  "name": "CS43L22",
130
- "bus": "1",
131
- "address": "0x4A",
132
129
  "gpioChip": "0",
133
130
  "resGpio": "",
134
- "format": "i2s",
131
+ "bus": "1",
132
+ "address": "0x4A",
133
+ "format": "i2s"
134
+ },
135
+ {
136
+ "id": "cs43l22-node",
137
+ "type": "cs43l22",
138
+ "z": "tab-cs43l22-demo",
139
+ "name": "CS43L22",
135
140
  "x": 580,
136
141
  "y": 150,
137
142
  "wires": [
138
143
  [
139
144
  "dbg-out"
140
145
  ]
141
- ]
146
+ ],
147
+ "device": "cs43l22-device-1"
142
148
  },
143
149
  {
144
150
  "id": "dbg-out",