1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/intel/README.md

70 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2015-09-21 18:03:50 +02:00
node-red-node-intel-gpio
========================
A <a href="http://nodered.org" target="_new">Node-RED</a> node to talk to an Intel
Galileo or Edison running mraa.
Install
-------
2016-03-02 14:25:52 +01:00
Run the following command in your Node-RED user directory - typically `~/.node-red`
2015-09-21 18:03:50 +02:00
2016-03-02 14:25:52 +01:00
npm i node-red-node-intel-gpio
2015-09-21 18:03:50 +02:00
Usage
-----
The Galileo or Edison must already be running Linux, and have Node-RED installed.
See the [Intel Downloads](https://software.intel.com/en-us/iot/home) for
hardware / downloads for your particular board.
2015-09-21 18:03:50 +02:00
Ensure the latest version of mraa libraries are installed: (version 1.5 as of Sept 2015)
echo "src mraa-upm http://iotdk.intel.com/repos/1.5/intelgalactic" > /etc/opkg/mraa-upm.conf
2018-05-07 10:40:42 +02:00
opkg update
2015-09-21 18:03:50 +02:00
opkg upgrade
**NOTE** : This node assumes that the mraa npm is already installed globally - as
it is on the Galileo and Edison boards.
If you do need to install Node-RED, you can do this as follows from the home directory of the root user
npm install -g --unsafe-perm node-red
mkdir .node-red
cd .node-red
npm install node-red-node-intel-gpio
### Analogue Input Node
2015-09-21 18:03:50 +02:00
Monitors the selected pin for changes. It outputs on a change of value.
2016-03-02 14:25:52 +01:00
As analogue inputs are continuously changing you can set the sample rate in ms from 20 to 65535.
2015-09-21 18:03:50 +02:00
### Digital Input Node
2015-09-21 18:03:50 +02:00
Monitors the selected pin for changes. It only outputs on a change of value.
### Digital Output Node
2015-09-21 18:03:50 +02:00
Sets the selected digital pin output high or low depending on the value of
2016-03-02 14:25:52 +01:00
`msg.payload` - expects a number or string 0 or 1.
2015-09-21 18:03:50 +02:00
### Pulse Width Modulation (PWM) Node
2015-09-21 18:03:50 +02:00
2016-03-02 14:25:52 +01:00
The `msg.payload` should contain a floating point number value
2015-09-21 18:03:50 +02:00
between 0 (off) and 1 (fully on), or a string representation thereof.
You can set the overall period (mS) in the edit dialogue.
For servo control set the period to 20mS and vary the input between 0.05 and 0.10,
0.05 = 5% of 20mS = 1mS
0.75 = 7.5% of 20mS = 1.5mS - typical servo centre point
0.10 = 10% of 20mS = 2mS
### Example
2015-09-21 18:03:50 +02:00
Simple flow to blink Pin 13
...tbd