-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,40 @@ | ||
# node-red-edgepi-thermocouple | ||
|
||
# Using Node Red | ||
If Node-RED is not yet installed, please see instructions for installing Node-RED at https://github.com/osensa/node-red-edgepi-led-array. | ||
|
||
# Installing this node | ||
1. git clone this repository | ||
2. Change to project directory: $ cd node-red-edgepi-thermocouple | ||
3. Install dependencies: $ npm install | ||
4. Change to .node-red directory: $ cd ~/.node-red | ||
5. $ npm install path_to_project_directory | ||
# node-red-edgepi-thermocouple | ||
|
||
# Troubleshooting | ||
* Note: upon being deployed, this node will run a bash executable to install Python module dependencies. The executable may not have the necessary file permissions to perform these operations. If an error related to file permissions is encountered, enter the following in the project directory, in order to give the bash script execute permission: | ||
- `$ chmod +x edgepi-thermocouple` | ||
## Installation: Node-Red on Debian | ||
Install a supported version of Node.js: https://nodered.org/docs/faq/node-versions | ||
``` | ||
$ sudo apt install curl | ||
$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - | ||
$ sudo apt install nodejs | ||
``` | ||
Verify Node.js instalthermocouple: | ||
``` | ||
$ node -v | ||
``` | ||
Verify npm instalthermocouple: | ||
``` | ||
$ npm -v | ||
``` | ||
3. Install Node-Red with npm | ||
``` | ||
$ cd ~ | ||
$ sudo npm install -g --unsafe-perm node-red | ||
``` | ||
|
||
# About | ||
This node sets up a multiprocessing environment consisting of the following features: | ||
1. Node runs in parent process (where Node-RED is running), and receives as input an injected value. This injected value can be any value, its purpose is only to signal the Node to trigger a "sample temperature" command to the Python script running in the child process. | ||
2. A child process running a Python script which uses code provided by Steven to sample ambient temperature using the RTU-Thermocouple. | ||
3. The parent process communicates with the child process, allowing the node in the parent process to receive temperature readings and display them in Node-RED. | ||
4. Install Node Red Dashboard | ||
``` | ||
$ cd ~/.node-red | ||
$ npm i node-red-dashboard | ||
``` | ||
|
||
# Sample Flow and UI Dashboard using thermocouple node and led-trigger node | ||
This sample flow shows the thermocouple node being used to obtain temperature readings, which are then used along with the LED trigger node (https://github.com/osensa/node-red-edgepi-led-array) to toggle an EdgePi LED on/off. Here, the on/off temperature is 24.5 degrees Celsius. | ||
![image](https://user-images.githubusercontent.com/77416463/168688664-a7c5646e-a811-49d5-a6bd-0015b8b9d99d.png) | ||
## Installation of this node | ||
``` | ||
$ npm install @edgepi-cloud/node-red-edgepi-thermocouple | ||
``` | ||
|
||
![image](https://user-images.githubusercontent.com/77416463/168688751-14f4eef6-b45b-4bfd-a072-582adcf61c7d.png) | ||
## Running Node-Red | ||
``` | ||
$ node-red | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters