node-red-contrib-smartnode
Version:
this project is a nodejs package for making the nodered support the Smart Device development. the pacakge require node-red enviroment.
33 lines (27 loc) • 2.19 kB
HTML
<!--
Copyright 2015 Maker Collider
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.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/xred" data-help-name="Driver">
<h3 id="两轮机器人控制节点"><a name="两轮机器人控制节点" href="#两轮机器人控制节点"></a>两轮机器人控制节点</h3>
<p>本节点使用<code>upm_ojl298</code>控制两轮小车。其中规定,从车的尾部看起,左侧车轮为左轮,右侧车轮为右轮。</p>
<h4 id="参数配置"><a name="参数配置" href="#参数配置"></a>参数配置</h4>
<ol>
<li>Name:参数配置</li><li>Left pwm:左电机pwm引脚</li><li>Left dir:左电机dir引脚</li><li>Right pwm:左电机pwm引脚</li><li>Right dir:左电机dir引脚</li><li>Speed:两轮电机速度</li><li>Timeout:超时时间</li></ol>
<h4 id="输入量"><a name="输入量" href="#输入量"></a>输入量</h4>
<ol>
<li>msg.speed:速度</li><li>msg.direction:方向</li></ol>
<h4 id="输出量"><a name="输出量" href="#输出量"></a>输出量</h4>
<p>无</p>
<h4 id="使用方法"><a name="使用方法" href="#使用方法"></a>使用方法</h4>
<ol>
<li>配置好节点的每个参数。</li><li><code>msg.speed</code>的值为0-100的整数,表示速度的百分比。</li><li><code>msg.direction</code>的值为0-4的整数,分别代表的是<code>前进</code>、<code>后退</code>、<code>左转</code>、<code>右转</code>和<code>停止</code>。</li><li>发送指令后,小车会按照规定方向与速度执行任务,并在超时时间到时,停止运动。超时时间使用<code>Timeout</code>进行设置,单位为秒,可以为小数。</li></ol>
</script>