New Pibrella node - Can use softpwm on all outputs.

Buzzer no longer breaks audio.
This commit is contained in:
Dave C-J
2014-12-26 15:24:21 +00:00
parent 3d8a510bae
commit 0ff8648258
6 changed files with 330 additions and 124 deletions

View File

@@ -13,8 +13,9 @@ Run the following command in the root directory of your Node-RED install
Pre-reqs
--------
Requires the WiringPi gpio command to be installed in order to work. See the <a href="http://wiringpi.com" target="new">WiringPi site</a> for details on how to do this.
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.
sudo apt-get -y install python-rpi.gpio
Usage
-----
@@ -25,14 +26,12 @@ A pair of input and output Node-RED nodes for the Raspberry Pi Pibrella from Pim
The output node will set the selected output high (on) or low (off) depending on the value passed in. Expects a <b>msg.payload</b> with either a 0 or 1 (or true or false).
The Buzzer is a divider so low numbers are high notes. 0 is off, and the sensible lowest note is around 250-300. 2 is the highest note. 1 is just a buzz - so you can use 0/1 type inputs.
You may also select PWM mode to dim the on board LEDs if you wish. Expects a value from 0 to 100.
**Note:** Using the buzzer is known to "kill" audio output via the 3.5mm socket.
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 <b>msg.payload</b> with either a 0 or 1 depending on the state of the input pin.
The <b>msg.topic</b> is set to <i>pibrella/{the pin id}</i> - which will be A, B, C, D or R.
<b>Note:</b> This node currently polls the pin every 250mS. This is not ideal as it loads the cpu.