node-red-contrib-periph-magnetometer 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 +2 -2
- package/examples/as5600/demo.json +1 -1
- package/examples/hmc5883l/demo.json +1 -1
- package/nodes/as5600/as5600.html +3 -3
- package/nodes/as5600/as5600.js +1 -1
- package/nodes/hmc5883l/hmc5883l.html +3 -3
- package/nodes/hmc5883l/hmc5883l.js +1 -1
- package/package.json +3 -2
- package/index.js +0 -11
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@ npm install node-red-contrib-periph-magnetometer
|
|
|
17
17
|
| Node | Kind | Description |
|
|
18
18
|
|------|------|-------------|
|
|
19
19
|
| `as5600-device` | config | I²C bus and address for an AS5600 |
|
|
20
|
-
| `
|
|
20
|
+
| `as5600` | input | Reads the absolute angle, raw count, and magnet detection status from an AS5600 contactless rotary position sensor over I²C. |
|
|
21
21
|
| `hmc5883l-device` | config | I²C bus and address for a HMC5883L |
|
|
22
|
-
| `
|
|
22
|
+
| `hmc5883l` | input | Reads the magnetic field on three axes from an HMC5883L 3-axis magnetometer over I²C. |
|
|
23
23
|
|
|
24
24
|
## Links
|
|
25
25
|
|
package/nodes/as5600/as5600.html
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<!-- Read node: trigger → measurements -->
|
|
37
37
|
<script type="text/javascript">
|
|
38
|
-
RED.nodes.registerType('
|
|
38
|
+
RED.nodes.registerType('as5600', {
|
|
39
39
|
category: 'Peripheral',
|
|
40
40
|
color: '#C084FC',
|
|
41
41
|
defaults: {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
});
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
|
-
<script type="text/html" data-template-name="
|
|
53
|
+
<script type="text/html" data-template-name="as5600">
|
|
54
54
|
<div class="form-row">
|
|
55
55
|
<label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
|
|
56
56
|
<input type="text" id="node-input-device">
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
|
-
<script type="text/html" data-help-name="
|
|
64
|
+
<script type="text/html" data-help-name="as5600">
|
|
65
65
|
<p>Reads the absolute angle, raw count, and magnet detection status from an AS5600
|
|
66
66
|
contactless rotary position sensor over I²C.</p>
|
|
67
67
|
<p>Any input message triggers a measurement. The device is configured via an
|
package/nodes/as5600/as5600.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
<!-- Read node: trigger → measurements -->
|
|
32
32
|
<script type="text/javascript">
|
|
33
|
-
RED.nodes.registerType('
|
|
33
|
+
RED.nodes.registerType('hmc5883l', {
|
|
34
34
|
category: 'Peripheral',
|
|
35
35
|
color: '#C084FC',
|
|
36
36
|
defaults: {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
});
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
|
-
<script type="text/html" data-template-name="
|
|
48
|
+
<script type="text/html" data-template-name="hmc5883l">
|
|
49
49
|
<div class="form-row">
|
|
50
50
|
<label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
|
|
51
51
|
<input type="text" id="node-input-device">
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
|
-
<script type="text/html" data-help-name="
|
|
59
|
+
<script type="text/html" data-help-name="hmc5883l">
|
|
60
60
|
<p>Reads the magnetic field on three axes from an HMC5883L 3-axis magnetometer over I²C.</p>
|
|
61
61
|
<p>Any input message triggers a measurement. The device is configured via an
|
|
62
62
|
<b>hmc5883l-device</b> config node.</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-periph-magnetometer",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Node-RED nodes for magnetometer chips",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
],
|
|
13
13
|
"node-red": {
|
|
14
14
|
"nodes": {
|
|
15
|
-
"as5600": "nodes/as5600/as5600.js"
|
|
15
|
+
"as5600": "nodes/as5600/as5600.js",
|
|
16
|
+
"hmc5883l": "nodes/hmc5883l/hmc5883l.js"
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
package/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
module.exports = function(RED) {
|
|
5
|
-
const nodesDir = path.join(__dirname, 'nodes');
|
|
6
|
-
if (!fs.existsSync(nodesDir)) return;
|
|
7
|
-
fs.readdirSync(nodesDir).forEach(function(chip) {
|
|
8
|
-
const nodeFile = path.join(nodesDir, chip, chip + '.js');
|
|
9
|
-
if (fs.existsSync(nodeFile)) require(nodeFile)(RED);
|
|
10
|
-
});
|
|
11
|
-
};
|