node-red-contrib-periph-environmental 1.0.1
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 +16 -0
- package/examples/.gitkeep +0 -0
- package/index.js +11 -0
- package/nodes/.gitkeep +0 -0
- package/package.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# node-red-contrib-periph-environmental
|
|
2
|
+
|
|
3
|
+
Node-RED nodes for environmental sensor chips — part of the [Periph](https://github.com/tuhde/Periph) library.
|
|
4
|
+
|
|
5
|
+
> **Coming soon.** Nodes will be added as chips in this category are implemented.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install node-red-contrib-periph-environmental
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Links
|
|
14
|
+
|
|
15
|
+
- [GitHub](https://github.com/tuhde/Periph)
|
|
16
|
+
- [All supported chips](https://github.com/tuhde/Periph#supported-chips)
|
|
File without changes
|
package/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
};
|
package/nodes/.gitkeep
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "node-red-contrib-periph-environmental",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Node-RED nodes for environmental sensor chips",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node-red",
|
|
7
|
+
"environmental",
|
|
8
|
+
"i2c",
|
|
9
|
+
"spi",
|
|
10
|
+
"sensor",
|
|
11
|
+
"peripheral"
|
|
12
|
+
],
|
|
13
|
+
"node-red": {
|
|
14
|
+
"nodes": {}
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"periph": "*"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|