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/PiGpio/locales/en-US/36-rpi-gpio.html
2021-02-09 11:44:11 +00:00

61 lines
2.9 KiB
HTML

<script type="text/html" data-help-name="rpi-gpio in">
<p>Raspberry Pi input node. Generates a <code>msg.payload</code> with either a
0 or 1 depending on the state of the input pin.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">number</span></dt>
<dd>the payload will be a 1 or a 0.</dd>
<dt>topic <span class="property-type">string</span></dt>
<dd>the topic will be set to <code>pi/{the pin number}</code>.</dd>
</dl>
<h3>Details</h3>
<p>You may also enable the input pullup resistor or the pulldown resistor.</p>
<p>Requires the RPi.GPIO python library version 0.5.10 (or better) in order to work.</p>
</script>
<script type="text/html" data-help-name="rpi-gpio out">
<p>Raspberry Pi output node. Can be used in Digital or PWM modes.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">number | string | boolean</span></dt>
</dl>
<h3>Details</h3>
<p>Digital mode - expects a <code>msg.payload</code> with either a 0 or 1 (or true or false),
and 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>PWM mode - expects an input value of a number 0 - 100. It can be floating point.</p>
<p>PWM mode can be used to drive a servo using input values between 10 and 20 only,
but will accept floating point values.
The GPIO2 pin is best for this as it uses hardware to do the PWM. For better servo support
consider the alternative node-red-node-pi-gpiod node.</p>
<p>Requires the RPi.GPIO python library version 0.5.10 (or better) in order to work.</p>
</script>
<script type="text/html" data-help-name="rpi-mouse">
<p>Raspberry Pi mouse button node. Requires a USB mouse.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">number</span></dt>
<dd>1 or 0 when the selected mouse button is pressed and released.</dd>
<dt>button <span class="property-type">number</span></dt>
<dd>1, 2, 4 corresponding to left, right and middle buttons, so you
can work out which button or combination was pressed.</dd>
<dt>topic <span class="property-type">string</span></dt>
<dd>set to <code>pi/mouse</code></dd>
</dl>
</script>
<script type="text/html" data-help-name="rpi-keyboard">
<p>Raspberry Pi keyboard handling node. Requires a USB keyboard.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">number</span></dt>
<dd>contains the keycode value</dd>
<dt>action <span class="property-type">string</span></dt>
<dd>set to "up", "down", or "repeat"</dd>
<dt>topic <span class="property-type">string</span></dt>
<dd>set to <code>pi/key</code></dd>
</dl>
</script>