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
Simon Walters d75beeebf4
Update 38-rpi-pibrella.js (#1024)
Update to work with python3 on Bullseye
2023-08-19 14:36:35 +01:00
..
38-rpi-pibrella.html Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
38-rpi-pibrella.js Update 38-rpi-pibrella.js (#1024) 2023-08-19 14:36:35 +01:00
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
nrgpio fix python2 fallback check (#892) 2022-03-11 17:49:55 +00:00
nrgpio.py Define raw_input() in Python 3 (#473) 2018-08-12 18:58:11 +01:00
package.json fix python2 fallback check (#892) 2022-03-11 17:49:55 +00:00
README.md fic link in pibrella readme 2020-05-08 13:52:01 +01:00

node-red-node-pibrella

A Node-RED node to control a Pibrella add-on board for a Raspberry-Pi.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

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 RPi.GPIO site for mode details.

sudo apt-get -y install python-rpi.gpio

Usage

A pair of input and output Node-RED nodes for the Raspberry Pi Pibrella from Pimoroni.

Output

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).

You may also select PWM mode to dim the on board LEDs if you wish. Expects a value from 0 to 100.

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.

Input

The input node generates a msg.payload with either a 0 or 1 depending on the state of the input pin.

The msg.topic is set to pibrella/{the pin id} - which will be A, B, C, D or R.