Skip to content

Commit

Permalink
update name and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iaj2 committed Aug 3, 2023
1 parent 80a15ca commit c8f73a7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
55 changes: 34 additions & 21 deletions README.md
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
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-red-edgepi-thermocouple",
"name": "@edgepi-cloud/node-red-edgepi-thermocouple",
"version": "1.0.0",
"description": "A node-red node for EdgePi thermocouple module",
"main": "edgepi-thermocouple.js",
Expand Down

0 comments on commit c8f73a7

Please sign in to comment.