UNPKG

node-red-node-rdk-gpio

Version:

配合RDK硬件使用GPIO功能的功能包(The basic Node-RED node for RDK GPIO)

114 lines (109 loc) 4.18 kB
<script type="text/html" data-help-name="rdk-gpio out"> <p>RDK GPIO output node</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">number | string | boolean</span></dt> </dl> <h3>Outputs</h3> <dl class="message-properties"> none </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> <h3>Settings</h3> <ul> <li>PIN: Choose a specific pin through simulated 40-pins component.</li> <li>BCM GPIO: Matched with chosen pin</li> <li>Initialize State: The initial value of the pin at deploy time can also be set to 0 or 1.</li> <li>Name: Custom name</li> </ul> </script> <script type="text/html" data-help-name="rdk-gpio pwm"> <p>RDK GPIO PWM node</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">number</span></dt> </dl> <h3>Outputs</h3> <dl class="message-properties"> none </dl> <h3>Details</h3> <p>PWM mode - expects an input value of a number 0 - 100. It can be floating point.</p> <h3>Settings</h3> <ul> <li>PIN: Choose a specific pin through simulated 40-pins component.</li> <li>BCM GPIO: Matched with chosen pin</li> <li>Frequncy: 48KHz~192MHz, default is 48000Hz</li> <li>Name: Custom name</li> </ul> </script> <script type="text/html" data-help-name="rdk-gpio in"> <p>RDK GPIO input node</p> <h3>Inputs</h3> <dl class="message-properties"> none </dl> <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>gpio/{the bcm number}</code>.</dd> </dl> <h3>Details</h3> <p>[experimental]You may also enable the input pullup resistor or the pulldown resistor.</p> <h3>Settings</h3> <ul> <li>PIN: Choose a specific pin through simulated 40-pins component.</li> <li>BCM GPIO: Matched with chosen pin</li> <li>Resistor: [experimental]</li> <li>Debounce: Default is 25ms.</li> <li>Read Init State: Choose whether to read initial state.</li> <li>Name: Custom Name</li> </ul> </script> <script type="text/html" data-help-name="rdk-mouse"> <p>RDK mouse button node [USB mouse is required.]</p> <h3>Inputs</h3> <dl class="message-properties"> none </dl> <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>io/mouse</code></dd> </dl> <h3>Settings</h3> <ul> <li>Button: Pick a type from left, right, roll or all.</li> <li>Name: Custom name</li> </ul> </script> <script type="text/html" data-help-name="rdk-keyboard"> <p>RDK keyboard handling node [USB keyboard is required]</p> <h3>Inputs</h3> <dl class="message-properties"> none </dl> <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>io/key</code></dd> </dl> <h3>Settings</h3> <ul> <li>Name: Custom name</li> </ul> </script>