mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add warning to Arduino node (as underlying firmata won't allow pins to be both inputas and outputs at the same time)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
Copyright 2013 IBM Corp.
|
||||
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<script type="text/x-red" data-template-name="arduino in">
|
||||
<div class="form-row">
|
||||
<div class="form-row">
|
||||
<label for="node-input-arduino"><i class="icon-tasks"></i> Arduino</label>
|
||||
<input type="text" id="node-input-arduino">
|
||||
</div>
|
||||
@@ -33,13 +33,14 @@
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-tips"><b>Note:</b> You cannot use the same pin for both output and input.</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="arduino in">
|
||||
<p>Arduino input node. Connects to local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||
<p>You can select either Digital or Analogue input. Outputs the value read as <b>msg.payload</b> and the pin number as <b>msg.topic</b>.</p>
|
||||
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
|
||||
<p>You can set the sample rate in ms from 20 to 65535.</p>
|
||||
<p>Arduino input node. Connects to local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||
<p>You can select either Digital or Analogue input. Outputs the value read as <b>msg.payload</b> and the pin number as <b>msg.topic</b>.</p>
|
||||
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
|
||||
<p>You can set the sample rate in ms from 20 to 65535.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -56,8 +57,8 @@
|
||||
outputs:1,
|
||||
icon: "arduino.png",
|
||||
label: function() {
|
||||
var a = "";
|
||||
if (this.state == "ANALOG") a = "A";
|
||||
var a = "";
|
||||
if (this.state == "ANALOG") a = "A";
|
||||
return this.name||"Pin: "+a+this.pin;
|
||||
},
|
||||
labelStyle: function() {
|
||||
@@ -67,7 +68,7 @@
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-template-name="arduino out">
|
||||
<div class="form-row">
|
||||
<div class="form-row">
|
||||
<label for="node-input-arduino"><i class="icon-tasks"></i> Arduino</label>
|
||||
<input type="text" id="node-input-arduino">
|
||||
</div>
|
||||
@@ -87,11 +88,12 @@
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-tips"><b>Note:</b> You cannot use the same pin for both output and input.</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="arduino out">
|
||||
<p>Arduino output node. Connects to local Arduino and writes to the selected digital pin. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects a numeric value in <b>msg.payload</b>. The pin number is set in the properties panel.</p>
|
||||
<p>Arduino output node. Connects to local Arduino and writes to the selected digital pin. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects a numeric value in <b>msg.payload</b>. The pin number is set in the properties panel.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
Reference in New Issue
Block a user