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/Pibrella/README.md

38 lines
1.3 KiB
Markdown
Raw Normal View History

2014-07-04 17:12:19 +02:00
node-red-node-pibrella
======================
A <a href="http://nodered.org" target="_new">Node-RED</a> node to control a <a href="http://pibrealla.com/" target="_new">Pibrella</a> add-on board for a Raspberry-Pi.
Install
-------
2016-03-02 14:25:52 +01:00
Run the following command in your Node-RED user directory - typically `~/.node-red`
2014-07-04 17:12:19 +02:00
npm install node-red-node-pibrella
Pre-reqs
--------
Requires the RPi.PIO python library version 0.5.8 (or better) in order to work. See the <a href="https://pypi.python.org/pypi/RPi.GPIO" target="new">RPi.GPIO site</a> for mode details.
2014-07-04 17:12:19 +02:00
sudo apt-get -y install python-rpi.gpio
2014-07-04 17:12:19 +02:00
Usage
-----
A pair of input and output Node-RED nodes for the Raspberry Pi Pibrella from Pimoroni.
2016-03-02 14:25:52 +01:00
### Output
2014-07-04 17:12:19 +02:00
2016-03-02 14:25:52 +01:00
The output node will set the selected output high (on) or low (off) depending on the value passed in. Expects a `msg.payload` with either a 0 or 1 (or true or false).
2014-07-04 17:12:19 +02:00
You may also select PWM mode to dim the on board LEDs if you wish. Expects a value from 0 to 100.
2014-07-04 17:12:19 +02:00
The Buzzer expects a number representing the frequency in Hz. 0 is off and 1 is a tone - so you can use 0/1 type inputs as well.
2014-07-04 17:12:19 +02:00
2016-03-02 14:25:52 +01:00
### Input
2014-07-04 17:12:19 +02:00
2016-03-02 14:25:52 +01:00
The input node generates a `msg.payload` with either a 0 or 1 depending on the state of the input pin.
2014-07-04 17:12:19 +02:00
2016-03-02 14:25:52 +01:00
The `msg.topic` is set to <i>pibrella/{the pin id}</i> - which will be A, B, C, D or R.