periph 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 (79) hide show
  1. package/README.md +19 -0
  2. package/examples/color/as7262/complete.js +60 -0
  3. package/examples/color/as7262/demo.js +65 -0
  4. package/examples/color/as7262/minimal.js +23 -0
  5. package/examples/environmental/aht10/complete.js +37 -0
  6. package/examples/environmental/aht10/demo.js +43 -0
  7. package/examples/environmental/aht10/minimal.js +12 -0
  8. package/examples/environmental/aht20/complete.js +41 -0
  9. package/examples/environmental/aht20/demo.js +49 -0
  10. package/examples/environmental/aht20/minimal.js +12 -0
  11. package/examples/environmental/am2320/complete.js +34 -0
  12. package/examples/environmental/am2320/demo.js +46 -0
  13. package/examples/environmental/am2320/minimal.js +21 -0
  14. package/examples/humidity/hdc1008/complete.js +39 -0
  15. package/examples/humidity/hdc1008/demo.js +46 -0
  16. package/examples/humidity/hdc1008/minimal.js +22 -0
  17. package/examples/humidity/hdc1080/complete.js +34 -0
  18. package/examples/humidity/hdc1080/demo.js +46 -0
  19. package/examples/humidity/hdc1080/minimal.js +22 -0
  20. package/examples/humidity/hs30xx/complete.js +43 -0
  21. package/examples/humidity/hs30xx/demo.js +40 -0
  22. package/examples/humidity/hs30xx/minimal.js +21 -0
  23. package/examples/humidity/hs40xx/complete.js +54 -0
  24. package/examples/humidity/hs40xx/demo.js +38 -0
  25. package/examples/humidity/hs40xx/minimal.js +21 -0
  26. package/examples/io_expander/tca9554/complete.js +63 -0
  27. package/examples/io_expander/tca9554/demo.js +58 -0
  28. package/examples/io_expander/tca9554/minimal.js +20 -0
  29. package/examples/led/ht16k33/complete.js +45 -0
  30. package/examples/led/ht16k33/demo.js +54 -0
  31. package/examples/led/ht16k33/minimal.js +24 -0
  32. package/examples/led/is31fl3731/complete.js +60 -0
  33. package/examples/led/is31fl3731/demo.js +72 -0
  34. package/examples/led/is31fl3731/minimal.js +26 -0
  35. package/examples/led/pca9685/complete.js +43 -0
  36. package/examples/led/pca9685/demo.js +77 -0
  37. package/examples/led/pca9685/minimal.js +24 -0
  38. package/examples/power/ina260/complete.js +38 -0
  39. package/examples/power/ina260/demo.js +32 -0
  40. package/examples/power/ina260/minimal.js +11 -0
  41. package/examples/power/lc709203f/complete.js +57 -0
  42. package/examples/power/lc709203f/demo.js +34 -0
  43. package/examples/power/lc709203f/minimal.js +11 -0
  44. package/examples/power/lm25066/complete.js +54 -0
  45. package/examples/power/lm25066/demo.js +41 -0
  46. package/examples/power/lm25066/minimal.js +12 -0
  47. package/examples/power/ltc4151/complete.js +40 -0
  48. package/examples/power/ltc4151/demo.js +49 -0
  49. package/examples/power/ltc4151/minimal.js +11 -0
  50. package/examples/power/max17048/complete.js +68 -0
  51. package/examples/power/max17048/demo.js +56 -0
  52. package/examples/power/max17048/minimal.js +19 -0
  53. package/examples/pressure/lps22hb/complete.js +43 -0
  54. package/examples/pressure/lps22hb/demo.js +43 -0
  55. package/examples/pressure/lps22hb/minimal.js +19 -0
  56. package/examples/pressure/mpl115a2/complete.js +25 -0
  57. package/examples/pressure/mpl115a2/demo.js +30 -0
  58. package/examples/pressure/mpl115a2/minimal.js +20 -0
  59. package/package.json +1 -1
  60. package/src/chips/color/as7262.js +419 -0
  61. package/src/chips/environmental/aht10.js +186 -0
  62. package/src/chips/environmental/aht20.js +226 -0
  63. package/src/chips/environmental/am2320.js +237 -0
  64. package/src/chips/humidity/hdc1008.js +262 -0
  65. package/src/chips/humidity/hdc1080.js +208 -0
  66. package/src/chips/humidity/hs30xx.js +254 -0
  67. package/src/chips/humidity/hs40xx.js +382 -0
  68. package/src/chips/io_expander/tca9554.js +407 -0
  69. package/src/chips/led/ht16k33.js +273 -0
  70. package/src/chips/led/is31fl3731.js +501 -0
  71. package/src/chips/led/pca9685.js +350 -0
  72. package/src/chips/power/ina260.js +229 -0
  73. package/src/chips/power/lc709203f.js +376 -0
  74. package/src/chips/power/lm25066.js +370 -0
  75. package/src/chips/power/ltc4151.js +297 -0
  76. package/src/chips/power/max17048.js +302 -0
  77. package/src/chips/pressure/lps22hb.js +257 -0
  78. package/src/chips/pressure/mpl115a2.js +171 -0
  79. package/src/discovery/registry.js +56 -14
@@ -0,0 +1,226 @@
1
+ 'use strict';
2
+
3
+ const _CMD_STATUS = Buffer.from([0x71]);
4
+ const _CMD_TRIGGER = Buffer.from([0xAC, 0x33, 0x00]);
5
+ const _CMD_SOFT_RESET = Buffer.from([0xBA]);
6
+ const _CMD_CAL_INIT = [
7
+ Buffer.from([0x1B, 0x00, 0x00]),
8
+ Buffer.from([0x1C, 0x00, 0x00]),
9
+ Buffer.from([0x1E, 0x00, 0x00]),
10
+ ];
11
+
12
+ const _STATUS_BUSY = 0x80;
13
+ const _STATUS_CAL = 0x08;
14
+ const _STATUS_READY = 0x18;
15
+
16
+ function _sleep(ms) {
17
+ const end = Date.now() + ms;
18
+ while (Date.now() < end) {}
19
+ }
20
+
21
+ function _crc8(data) {
22
+ let crc = 0xFF;
23
+ for (const byte of data) {
24
+ crc ^= byte;
25
+ for (let i = 0; i < 8; i++) {
26
+ crc = (crc & 0x80) ? ((crc << 1) ^ 0x31) & 0xFF : (crc << 1) & 0xFF;
27
+ }
28
+ }
29
+ return crc;
30
+ }
31
+
32
+ function _decodeRaw(data) {
33
+ return {
34
+ rawRh: (data[1] << 12) | (data[2] << 4) | (data[3] >> 4),
35
+ rawT: ((data[3] & 0x0F) << 16) | (data[4] << 8) | data[5],
36
+ };
37
+ }
38
+
39
+ /**
40
+ * AHT20 temperature and humidity sensor — minimal interface.
41
+ *
42
+ * Provides temperature and humidity readings with no configuration beyond
43
+ * the connection. Handles power-on wait, calibration check (soft reset and
44
+ * calibration register init if needed) and measurement triggering automatically.
45
+ *
46
+ * Default configuration (baked in at construction):
47
+ * - One-shot measurement triggered on every read() call
48
+ * - 80 ms wait after trigger, then BUSY polling (10 ms steps, 200 ms guard)
49
+ * - No CRC verification (CRC check is Full-only)
50
+ *
51
+ * Constructor caveat: JS constructors cannot be async, so the init sequence
52
+ * runs unawaited. Every measurement awaits it first, so errors (e.g. sensor
53
+ * not calibrated after init) surface as a rejected promise from the
54
+ * first read()/isCalibrated() call.
55
+ */
56
+ class AHT20Minimal {
57
+ /**
58
+ * @param {import('../../connection/connection').Connection} connection - Configured I²C connection pointing at the device (address 0x38).
59
+ */
60
+ constructor(connection) {
61
+ this._conn = connection;
62
+ this._ready = this._init();
63
+ this._ready.catch(() => {});
64
+ }
65
+
66
+ async _isReady() {
67
+ return ((await this._readStatus()) & _STATUS_READY) === _STATUS_READY;
68
+ }
69
+
70
+ // The datasheet tests the status word against 0x18 once after power-on.
71
+ async _calibrate() {
72
+ if (await this._isReady()) return;
73
+ await this._conn.write(_CMD_SOFT_RESET);
74
+ _sleep(20);
75
+ if (await this._isReady()) return;
76
+ for (const cmd of _CMD_CAL_INIT) {
77
+ await this._conn.write(cmd);
78
+ _sleep(10);
79
+ }
80
+ if (!(await this._isReady())) {
81
+ throw new Error('AHT20 not calibrated after init');
82
+ }
83
+ }
84
+
85
+ async _init() {
86
+ _sleep(100);
87
+ await this._calibrate();
88
+ _sleep(10);
89
+ }
90
+
91
+ async _readStatus() {
92
+ await this._conn.write(_CMD_STATUS);
93
+ return (await this._conn.read(1))[0];
94
+ }
95
+
96
+ async _measure(length = 6) {
97
+ await this._ready;
98
+ await this._conn.write(_CMD_TRIGGER);
99
+ _sleep(80); // conversion takes > 80 ms
100
+ for (let waited = 0; ; waited += 10) {
101
+ const data = await this._conn.read(length);
102
+ if (!(data[0] & _STATUS_BUSY)) return data;
103
+ if (waited >= 200) throw new Error('AHT20 measurement timeout');
104
+ _sleep(10);
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Trigger a measurement and return temperature and humidity.
110
+ *
111
+ * Sends the trigger command, waits 80 ms, polls BUSY, reads 6 bytes and
112
+ * decodes the raw 20-bit values into physical units.
113
+ *
114
+ * @returns {Promise<{ temperature_c: number, humidity_pct: number }>}
115
+ * temperature_c: Temperature in degrees Celsius (-50 to 150 °C).
116
+ * humidity_pct: Relative humidity in percent (0 to 100 %RH).
117
+ */
118
+ async read() {
119
+ const { rawRh, rawT } = _decodeRaw(await this._measure());
120
+ return {
121
+ temperature_c: (rawT / 1048576.0) * 200.0 - 50.0,
122
+ humidity_pct: Math.min(Math.max((rawRh / 1048576.0) * 100.0, 0.0), 100.0),
123
+ };
124
+ }
125
+ }
126
+
127
+ /**
128
+ * AHT20 full interface — extends AHT20Minimal with CRC, raw values, status and dew point.
129
+ */
130
+ class AHT20Full extends AHT20Minimal {
131
+ /**
132
+ * @param {import('../../connection/connection').Connection} connection - Configured I²C connection pointing at the device (address 0x38).
133
+ */
134
+ constructor(connection) {
135
+ super(connection);
136
+ }
137
+
138
+ /**
139
+ * Trigger a measurement and return temperature only.
140
+ * @returns {Promise<number>} Temperature in degrees Celsius (-50 to 150 °C).
141
+ */
142
+ async readTemperature() {
143
+ return (await this.read()).temperature_c;
144
+ }
145
+
146
+ /**
147
+ * Trigger a measurement and return humidity only.
148
+ * @returns {Promise<number>} Relative humidity in percent (0 to 100 %RH).
149
+ */
150
+ async readHumidity() {
151
+ return (await this.read()).humidity_pct;
152
+ }
153
+
154
+ /**
155
+ * Trigger a measurement and return the raw 20-bit values.
156
+ * @returns {Promise<{ raw_humidity: number, raw_temperature: number }>} Each 0 to 1048575.
157
+ */
158
+ async readRaw() {
159
+ const { rawRh, rawT } = _decodeRaw(await this._measure());
160
+ return { raw_humidity: rawRh, raw_temperature: rawT };
161
+ }
162
+
163
+ /**
164
+ * Trigger a measurement, read 7 bytes and verify the CRC-8
165
+ * (polynomial 0x31, initial value 0xFF, over bytes 0 to 5, compared with byte 6).
166
+ * @returns {Promise<{ temperature_c: number, humidity_pct: number, crc_ok: boolean }>}
167
+ */
168
+ async readWithCrc() {
169
+ const data = await this._measure(7);
170
+ const { rawRh, rawT } = _decodeRaw(data);
171
+ return {
172
+ temperature_c: (rawT / 1048576.0) * 200.0 - 50.0,
173
+ humidity_pct: Math.min(Math.max((rawRh / 1048576.0) * 100.0, 0.0), 100.0),
174
+ crc_ok: _crc8(data.slice(0, 6)) === data[6],
175
+ };
176
+ }
177
+
178
+ /**
179
+ * Read the status byte.
180
+ * @returns {Promise<number>} Status byte (bit 7 BUSY, bit 3 CAL).
181
+ */
182
+ async readStatus() {
183
+ await this._ready;
184
+ return this._readStatus();
185
+ }
186
+
187
+ /**
188
+ * Check if the calibration bit is set in the status byte.
189
+ * @returns {Promise<boolean>} True if the sensor reports calibration enabled.
190
+ */
191
+ async isCalibrated() {
192
+ return !!((await this.readStatus()) & _STATUS_CAL);
193
+ }
194
+
195
+ /**
196
+ * Check if the busy bit is set in the status byte.
197
+ * @returns {Promise<boolean>} True if a measurement is in progress.
198
+ */
199
+ async isBusy() {
200
+ return !!((await this.readStatus()) & _STATUS_BUSY);
201
+ }
202
+
203
+ /**
204
+ * Send the soft reset command, wait 20 ms, and re-run the calibration check.
205
+ * @returns {Promise<void>} Rejects if the sensor does not report calibrated afterwards.
206
+ */
207
+ async softReset() {
208
+ await this._ready;
209
+ await this._conn.write(_CMD_SOFT_RESET);
210
+ _sleep(20);
211
+ await this._calibrate();
212
+ }
213
+
214
+ /**
215
+ * Trigger a measurement and return the dew point (Magnus formula).
216
+ * @returns {Promise<number>} Dew point in degrees Celsius; -50 if humidity is 0 %RH.
217
+ */
218
+ async dewPoint() {
219
+ const { temperature_c: t, humidity_pct: rh } = await this.read();
220
+ if (rh <= 0) return -50.0;
221
+ const gamma = Math.log(rh / 100.0) + (17.62 * t) / (243.12 + t);
222
+ return (243.12 * gamma) / (17.62 - gamma);
223
+ }
224
+ }
225
+
226
+ module.exports = { AHT20Minimal, AHT20Full };
@@ -0,0 +1,237 @@
1
+ 'use strict';
2
+
3
+ const _FUNC_READ = 0x03;
4
+ const _FUNC_WRITE = 0x10;
5
+ const _MIN_INTERVAL_MS = 2000;
6
+
7
+ const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
8
+
9
+ /**
10
+ * CRC-16 (Modbus) used by the AM2320: init 0xFFFF, polynomial 0xA001 (reflected).
11
+ * @param {Buffer|number[]} data
12
+ * @returns {number}
13
+ */
14
+ function crc16(data) {
15
+ let crc = 0xFFFF;
16
+ for (const byte of data) {
17
+ crc ^= byte;
18
+ for (let i = 0; i < 8; i++) crc = (crc & 1) ? (crc >> 1) ^ 0xA001 : crc >> 1;
19
+ }
20
+ return crc;
21
+ }
22
+
23
+ /** The AM2320 answered with an error response (function code with bit 7 set); `code` is 0x80-0x84. */
24
+ class AM2320Error extends Error {
25
+ constructor(code) {
26
+ super('AM2320 error response 0x' + code.toString(16).toUpperCase());
27
+ this.code = code;
28
+ }
29
+ }
30
+
31
+ function _toTemperature(raw) {
32
+ const t = (raw & 0x7FFF) / 10.0;
33
+ return (raw & 0x8000) ? -t : t;
34
+ }
35
+
36
+ /**
37
+ * AM2320 humidity and temperature sensor — minimal interface.
38
+ *
39
+ * The sensor speaks a Modbus-style protocol: every read is a wake-up (a write the sensor does
40
+ * not acknowledge), a command write, a 2 ms wait and a read whose response carries a CRC-16.
41
+ * The sensor measures after each communication and returns that result on the next one, so
42
+ * `read()` returns the previous measurement; transactions are kept at least 2 s apart by
43
+ * sleeping the remainder.
44
+ *
45
+ * Default configuration: the constructor does not touch the bus; the first `read()` waits until
46
+ * 2 s after construction (power-up settling); one retry after a new wake on a CRC mismatch or
47
+ * bus error.
48
+ */
49
+ class AM2320Minimal {
50
+ /**
51
+ * @param {import('../../connection/connection').Connection} connection - Configured I²C connection pointing at the device (address 0x5C, standard mode, at most 100 kHz).
52
+ */
53
+ constructor(connection) {
54
+ this._conn = connection;
55
+ this._minIntervalMs = _MIN_INTERVAL_MS;
56
+ this._last = Date.now();
57
+ }
58
+
59
+ async _waitInterval() {
60
+ if (this._minIntervalMs <= 0) return;
61
+ const remaining = this._minIntervalMs - (Date.now() - this._last);
62
+ if (remaining > 0) await _sleep(remaining);
63
+ }
64
+
65
+ async _wake() {
66
+ try {
67
+ await this._conn.write(Buffer.from([0x00])); // the sleeping sensor NACKs this
68
+ } catch (e) { /* expected */ }
69
+ await _sleep(1);
70
+ }
71
+
72
+ async _exchange(frame, responseLen) {
73
+ await this._waitInterval();
74
+ await this._wake();
75
+ await this._conn.write(Buffer.from(frame));
76
+ await _sleep(2);
77
+ const data = Buffer.from(await this._conn.read(responseLen));
78
+ this._last = Date.now();
79
+ return data;
80
+ }
81
+
82
+ _check(data, fn, responseLen) {
83
+ if (data.length >= 1 && (data[0] & 0x80)) throw new AM2320Error(data[0]);
84
+ if (data.length < responseLen) throw new Error('AM2320 short response');
85
+ if (data[0] !== fn) throw new Error('AM2320 unexpected function code');
86
+ const crc = data[responseLen - 2] | (data[responseLen - 1] << 8);
87
+ if (crc16(data.subarray(0, responseLen - 2)) !== crc) throw new Error('AM2320 CRC mismatch');
88
+ }
89
+
90
+ async _withRetry(fn) {
91
+ try {
92
+ return await fn();
93
+ } catch (e) {
94
+ if (e instanceof AM2320Error) throw e;
95
+ return await fn();
96
+ }
97
+ }
98
+
99
+ async _readRegisters(start, count) {
100
+ return this._withRetry(async () => {
101
+ const data = await this._exchange([_FUNC_READ, start, count], count + 4);
102
+ this._check(data, _FUNC_READ, count + 4);
103
+ if (data[1] !== count) throw new Error('AM2320 unexpected byte count');
104
+ return data.subarray(2, 2 + count);
105
+ });
106
+ }
107
+
108
+ /**
109
+ * Read temperature and humidity (registers 0x00-0x03). Returns the previous measurement;
110
+ * see `AM2320Full.readFresh()` for the real-time value.
111
+ * @returns {Promise<{temperature_c: number, humidity_pct: number}>} °C and %RH.
112
+ */
113
+ async read() {
114
+ const d = await this._readRegisters(0x00, 4);
115
+ return { temperature_c: _toTemperature((d[2] << 8) | d[3]), humidity_pct: ((d[0] << 8) | d[1]) / 10.0 };
116
+ }
117
+ }
118
+
119
+ /**
120
+ * AM2320 full interface — single values, raw words, fresh read, registers, user registers.
121
+ *
122
+ * Extends AM2320Minimal with temperature-only and humidity-only reads, raw words, the two-read
123
+ * real-time value, arbitrary register read/write (CRC verified), device information, the user
124
+ * registers and an explicit wake-up.
125
+ */
126
+ class AM2320Full extends AM2320Minimal {
127
+ /**
128
+ * @param {import('../../connection/connection').Connection} connection - Configured I²C connection pointing at the device (address 0x5C).
129
+ */
130
+ constructor(connection) {
131
+ super(connection);
132
+ }
133
+
134
+ /**
135
+ * Read the temperature only (registers 0x02-0x03).
136
+ * @returns {Promise<number>} °C.
137
+ */
138
+ async readTemperature() {
139
+ const d = await this._readRegisters(0x02, 2);
140
+ return _toTemperature((d[0] << 8) | d[1]);
141
+ }
142
+
143
+ /**
144
+ * Read the humidity only (registers 0x00-0x01).
145
+ * @returns {Promise<number>} %RH.
146
+ */
147
+ async readHumidity() {
148
+ const d = await this._readRegisters(0x00, 2);
149
+ return ((d[0] << 8) | d[1]) / 10.0;
150
+ }
151
+
152
+ /**
153
+ * Read the raw 16-bit words; the temperature word is sign + magnitude.
154
+ * @returns {Promise<number[]>} [rawHumidity, rawTemperature].
155
+ */
156
+ async readRaw() {
157
+ const d = await this._readRegisters(0x00, 4);
158
+ return [(d[0] << 8) | d[1], (d[2] << 8) | d[3]];
159
+ }
160
+
161
+ /**
162
+ * Read twice (at least 2 s apart) and return the second, real-time result.
163
+ * @returns {Promise<{temperature_c: number, humidity_pct: number}>}
164
+ */
165
+ async readFresh() {
166
+ await this.read();
167
+ return this.read();
168
+ }
169
+
170
+ /**
171
+ * Read `count` registers from `start` (function 0x03, CRC verified).
172
+ * @param {number} start - First register address (0x00-0x1F).
173
+ * @param {number} count - Number of registers, 1-10.
174
+ * @returns {Promise<Buffer>}
175
+ */
176
+ async readRegisters(start, count) {
177
+ if (!(count >= 1 && count <= 10)) throw new RangeError('count must be 1-10');
178
+ if (!(start >= 0 && start <= 0x1F && start + count <= 0x20)) throw new RangeError('register range out of bounds');
179
+ return Buffer.from(await this._readRegisters(start, count));
180
+ }
181
+
182
+ /**
183
+ * Write the user registers 0x10-0x13 (function 0x10 with CRC).
184
+ * @param {number} start - First register address (0x10-0x13).
185
+ * @param {Buffer|number[]} data - 1-4 bytes; start + length must not pass 0x14.
186
+ * @returns {Promise<void>}
187
+ */
188
+ async writeRegisters(start, data) {
189
+ const bytes = Buffer.from(data);
190
+ if (bytes.length < 1 || bytes.length > 4 || start < 0x10 || start + bytes.length > 0x14) {
191
+ throw new RangeError('only the user registers 0x10-0x13 may be written');
192
+ }
193
+ const body = Buffer.concat([Buffer.from([_FUNC_WRITE, start, bytes.length]), bytes]);
194
+ const crc = crc16(body);
195
+ const frame = Buffer.concat([body, Buffer.from([crc & 0xFF, crc >> 8])]);
196
+ await this._withRetry(async () => {
197
+ const resp = await this._exchange(frame, 5);
198
+ this._check(resp, _FUNC_WRITE, 5);
199
+ if (resp[1] !== start || resp[2] !== bytes.length) throw new Error('AM2320 unexpected write response');
200
+ });
201
+ }
202
+
203
+ /**
204
+ * Read the device information (registers 0x08-0x0E).
205
+ * @returns {Promise<{model: number, version: number, device_id: number}>}
206
+ */
207
+ async readDeviceInfo() {
208
+ const d = await this._readRegisters(0x08, 7);
209
+ return { model: (d[0] << 8) | d[1], version: d[2], device_id: d.readUInt32BE(3) };
210
+ }
211
+
212
+ /**
213
+ * Read the two 16-bit user registers (0x10-0x13).
214
+ * @returns {Promise<number[]>} [user1, user2].
215
+ */
216
+ async readUserRegisters() {
217
+ const d = await this._readRegisters(0x10, 4);
218
+ return [(d[0] << 8) | d[1], (d[2] << 8) | d[3]];
219
+ }
220
+
221
+ /**
222
+ * Write the two 16-bit user registers (0x10-0x13).
223
+ * @param {number} user1 - 16-bit value for registers 0x10-0x11.
224
+ * @param {number} user2 - 16-bit value for registers 0x12-0x13.
225
+ * @returns {Promise<void>}
226
+ */
227
+ async writeUserRegisters(user1, user2) {
228
+ await this.writeRegisters(0x10, [(user1 >> 8) & 0xFF, user1 & 0xFF, (user2 >> 8) & 0xFF, user2 & 0xFF]);
229
+ }
230
+
231
+ /** Wake the sensor: a dummy write (the NACK is ignored) and a 1 ms wait. */
232
+ async wake() {
233
+ await this._wake();
234
+ }
235
+ }
236
+
237
+ module.exports = { AM2320Minimal, AM2320Full, AM2320Error, crc16 };