update hardware nodes info style

This commit is contained in:
Dave Conway-Jones
2016-03-02 13:25:52 +00:00
parent 88985f4fe7
commit 81c532fdce
42 changed files with 130 additions and 125 deletions

View File

@@ -8,14 +8,14 @@ Install
**This install is for Debian based OS on Hummingboard.**
Run the following command in the root directory of your Node-RED install:
Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-hpgpio
**Note :** This **should** be run as root in order to move and set SUID permissions on a script to talk to the gpio pins. Alternatively you can run as a normal user and then move the file and change permissions manually.
sudo cp node_modules/node-red-node-hpgpio/gpiohb /usr/local/bin/
sudo chmod 4755 /usr/lcoal/bin/gpiohb
sudo chmod 4755 /usr/local/bin/gpiohb
Usage
@@ -27,19 +27,19 @@ This requires a small script (gpiohb) to run as root in order to work. It should
**Note:** We are using the actual physical pin numbers as they are easier to locate.
###Output node
### Output node
Expects a <b>msg.payload</b> with either a 0 or 1 (or true or false).
Expects a `msg.payload` with either a 0 or 1 (or true or false).
Will set the selected physical pin high or low depending on the value passed in.
The initial value of the pin at deploy time can also be set to 0 or 1.
###Input node
### Input node
Generates a **msg.payload** with either a 0 or 1 depending on the state of the input pin.
Generates a `msg.payload` with either a 0 or 1 depending on the state of the input pin.
The **msg.topic** is set to **pin/{the pin number}**
The `msg.topic` is set to *pin/{the pin number}*
**Note:** The input node waits for a change on the level of the pin before reading the value - and then resets to wait for the next interrupt - so it is possible to miss very fast changes as we may still be reading the value when the second edge occurs.

View File

@@ -52,9 +52,9 @@
</script>
<script type="text/x-red" data-help-name="hb-gpio in">
<p>Hummingboard GPIO input pin node. Generates a <b>msg.payload</b> with either a 0 or 1 depending on the state of the input pin.</p>
<p>Hummingboard GPIO input pin node. Generates a <code>msg.payload</code> with either a 0 or 1 depending on the state of the input pin.</p>
<p>You may also enable the input pullup resitor or the pulldown resistor.</p>
<p>The <b>msg.topic</b> is set to <i>pi/{the pin number}</i></p>
<p>The <code>msg.topic</code> is set to <i>pi/{the pin number}</i></p>
<p><b>Note:</b> we are using the actual physical pin numbers on connector P1 as they are easier to locate.</p>
<p><b>Note:</b> requires the gpiohb command to be executeable as root in order to work.</p>
</script>
@@ -120,7 +120,7 @@
</script>
<script type="text/x-red" data-help-name="hb-gpio out">
<p>Hummingboard GPIO output pin node. Expects a <b>msg.payload</b> with either a 0 or 1 (or true or false).</p>
<p>Hummingboard GPIO output pin node. Expects a <code>msg.payload</code> with either a 0 or 1 (or true or false).</p>
<p>Will set the selected physical pin high or low depending on the value passed in.</p>
<p>The initial value of the pin at deploy time can also be set to 0 or 1.</p>
<p><b>Note:</b> we are using the actual physical pin numbers as they are easier to locate.</p>

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-hbgpio",
"version" : "0.0.3",
"version" : "0.0.4",
"description" : "A Node-RED node for the GPIO of the Hummingboard",
"dependencies": {
},