added i18n help files (#766)

This commit is contained in:
heikokue
2021-03-12 14:17:23 +01:00
committed by GitHub
parent 07460b9404
commit 0772b545ea
38 changed files with 578 additions and 584 deletions

View File

@@ -24,14 +24,6 @@
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
</script>
<script type="text/html" data-help-name="arduino in">
<p>Arduino input node. Connects to a local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</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>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('arduino in',{
category: 'Arduino',
@@ -85,14 +77,6 @@
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
</script>
<script type="text/html" 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>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects an integer numeric
value in <code>msg.payload</code>. The pin number is set in the properties panel.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('arduino out', {
category: 'Arduino',

View File

@@ -0,0 +1,16 @@
<script type="text/html" data-help-name="arduino in">
<p>Arduino input node. Connects to a local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</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>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>
</script>
<script type="text/html" 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>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects an integer numeric
value in <code>msg.payload</code>. The pin number is set in the properties panel.</p>
</script>

View File

@@ -0,0 +1,33 @@
<script type="text/html" data-help-name="pi-gpiod 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.
Requires the <a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a>
daemon to be running on the host computer in order to work.</p>
<p><b>Outputs</b>
<ul>
<li><code>msg.payload</code> - <i>number</i> - the level of the pin (0 or 1).</li>
<li><code>msg.topic</code> - <i>string</i> - pi/{the pin number}</li>
</ul>
<p><b>Details</b></p>
<p>You may also enable the input pullup resistor &uarr; or the pulldown resistor &darr;.</p>
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
<p><b>Note:</b> the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
</script>
<script type="text/html" data-help-name="pi-gpiod out">
<p>Raspberry Pi output node. Can be used in Digital, PWM or Servo modes. Requires the
<a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a> daemon to be running in order to work.</p>
<p><b>Inputs</b>
<ul>
<li><code>msg.payload</code> - <i>number | string</i> - 0,1 (Digital), 0-100 (PWM, Servo)</li>
</ul>
<p><b>Details</b></p>
<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>When using PWM and Servo modes, the input value should be a number 0 - 100, and can be floating point.</p>
<p>In Servo mode you can stop the output by sending a <code>msg.payload</code> of <code>null</code> or <code>""</code>.</p>
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
<p><b>Note</b>: the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
</script>

View File

@@ -167,22 +167,6 @@
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
</script>
<script type="text/html" data-help-name="pi-gpiod 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.
Requires the <a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a>
daemon to be running on the host computer in order to work.</p>
<p><b>Outputs</b>
<ul>
<li><code>msg.payload</code> - <i>number</i> - the level of the pin (0 or 1).</li>
<li><code>msg.topic</code> - <i>string</i> - pi/{the pin number}</li>
</ul>
<p><b>Details</b></p>
<p>You may also enable the input pullup resistor &uarr; or the pulldown resistor &darr;.</p>
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
<p><b>Note:</b> the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
</script>
<script type="text/javascript">
var bcm2pin = {
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",
@@ -435,23 +419,6 @@
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
</script>
<script type="text/html" data-help-name="pi-gpiod out">
<p>Raspberry Pi output node. Can be used in Digital, PWM or Servo modes. Requires the
<a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a> daemon to be running in order to work.</p>
<p><b>Inputs</b>
<ul>
<li><code>msg.payload</code> - <i>number | string</i> - 0,1 (Digital), 0-100 (PWM, Servo)</li>
</ul>
<p><b>Details</b></p>
<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>When using PWM and Servo modes, the input value should be a number 0 - 100, and can be floating point.</p>
<p>In Servo mode you can stop the output by sending a <code>msg.payload</code> of <code>null</code> or <code>""</code>.</p>
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
<p><b>Note</b>: the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
</script>
<script type="text/javascript">
var bcm2pin = {
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",

View File

@@ -0,0 +1,100 @@
<script type="text/x-red" data-help-name="rpi-sensehat in">
<p>Raspberry Pi Sense HAT input node.</p>
<p>This node sends readings from the various sensors on the Sense HAT,
grouped into three sets; motion events, environment events and joystick events.</p>
<p><b>Motion events</b></p>
<p>Motion events include readings from the accelerometer, gyroscope and magnetometer,
as well as the current compass heading. They are sent at a rate of approximately 10
per second. The <code>topic</code> is set to <code>motion</code> and the
<code>payload</code> is an object with the following values:</p>
<ul>
<li><code>acceleration.x/y/z</code> : the acceleration intensity in Gs</li>
<li><code>gyroscope.x/y/z</code> : the rotational intensity in radians/s</li>
<li><code>orientation.roll/pitch/yaw</code> : the angle of the axis in degrees</li>
<li><code>compass</code> : the direction of North in degrees</li>
</ul>
<p><b>Environment events</b></p>
<p>Environment events include readings from the temperature, humidity and pressure
sensors. They are sent at a rate of approximately 1 per second. The <code>topic</code>
is set to <code>environment</code> and the <code>payload</code> is an object
with the following values:</p>
<ul>
<li><code>temperature</code> : degrees Celsius</li>
<li><code>humidity</code> : percentage of relative humidity</li>
<li><code>pressure</code> : Millibars</li>
</ul>
<p><b>Joystick events</b></p>
<p>Joystick events are sent when the Sense HAT joystick is interacted with. The
<code>topic</code> is set to <code>joystick</code> and the <code>payload</code>
is an object with the following values:</p>
<ul>
<li><code>key</code> : one of <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code>, <code>ENTER</code></li>
<li><code>state</code> : the state of the key:
<ul>
<li><code>0</code> : the key has been released</li>
<li><code>1</code> : the key has been pressed</li>
<li><code>2</code> : the key is being held down</li>
</ul>
</li>
</ul>
</script>
<script type="text/x-red" data-help-name="rpi-sensehat out">
<p>Raspberry Pi Sense HAT output node.</p>
<p>This node sends commands to the 8x8 LED display on the Sense HAT.</p>
<p>Commands are sent to the node in <code>msg.payload</code>. Multiple commands can
be sent in a single message by separating them with newline (\n) characters. You must
use a function node or a change node (jsonata expression) when using the newline (\n)
character to create a payload containing multiple commands.<p>
<p><b>Set the colour of individual pixels</b></p>
<p>Format: <code>&lt;x&gt;,&lt;y&gt;,&lt;colour&gt;</code>
<p><code>x</code> and <code>y</code> must either be a value from 0 to 7, a
<code>*</code> to indicate the entire row or column, or a range such as <code>3-6</code>.</p>
<p><code>colour</code> must be one of:
<ul>
<li>the well-known <a href="https://en.wikipedia.org/wiki/Web_colors" target="_new">HTML colour names</a>
- eg <code>red</code> or <code>aquamarine</code>,</li>
<li>the <a href="http://cheerlights.com/cheerlights-api/">CheerLights colour names</a>,</li>
<li>a HEX colour value - eg <code>#aa9900</code></li>
<li>an RGB triple - <code>190,255,0</code></li>
<li>or simply <code>off</code></li>
</ul>
<p><i>Examples</i></p>
<p>To set the entire screen to red:</p>
<p><code>*,*,red</code></p>
<p>To set the four corners of the display to red, green (#00ff00), yellow and blue (0,0,255):</p>
<p><code>0,0,red,0,7,#00ff00,7,7,yellow,7,0,0,0,255</code></p>
<p>To set a 3-pixel wide column to purple:</p>
<p><code>4-6,*,purple</code></p>
<p><b>Rotate the screen</b></p>
<p>Format: <code>R&lt;angle&gt;</code></p>
<p><code>angle</code> must be 0, 90, 180 or 270.</p>
<p>Example: <code>R180</code></p>
<p><b>Flip the screen</b></p>
<p>Format: <code>F&lt;axis&gt;</code></p>
<p><code>axis</code> must be either <code>H</code> or <code>V</code> to flip on
the horizontal or vertical axis respectively.</p>
<p>Example: <code>FV</code></p>
<p><b>Scroll a message</b></p>
<p>If <code>msg.payload</code> is not recognised as any of the above commands,
it is treated as a text message to be scrolled across the screen.</p>
<p>If the text is a single character, it will be displayed without scrolling.
To scroll a single character, append a blank space after it - <code>"A "</code>.</p>
<p>The following message properties can be used to customise the appearance:</p>
<ul>
<li><code>msg.color</code> - the colour of the text, default: <code>white</code></li>
<li><code>msg.background</code> - the colour of the background, default: <code>off</code></li>
<li><code>msg.speed</code> - the scroll speed. A value in the range 1 (slower) to 5 (faster), default: <code>3</code></li>
</ul>
<p><b>Set the screen brightness</b></p>
<p>Format: <code>D&lt;level&gt;</code></p>
<p><code>level</code> must be 0 (low) or 1 (high).</p>
<p>Example: <code>D1</code></p>
</script>

View File

@@ -1,132 +1,33 @@
<script type="text/x-red" data-template-name="rpi-sensehat in">
<div class="form-row">
<label><i class="fa fa-arrow-right"></i> <span data-i18n="sensehat.label.outputs"></label>
<label style="width: auto" for="node-input-motion"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-motion"> <span data-i18n="sensehat.label.motionEvents"></label>
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.motionEventsExamples"></div>
</div>
<div class="form-row">
<label></label>
<label style="width: auto" for="node-input-env"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-env"> <span data-i18n="sensehat.label.environmentEvents"></label>
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.environmentEventsExamples"></div>
</div>
<div class="form-row">
<label></label>
<label style="width: auto" for="node-input-stick"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-stick"> <span data-i18n="sensehat.label.joystickEvents"></label>
</div>
<div class="form-row">
<label><i class="fa fa-arrow-right"></i> <span data-i18n="sensehat.label.outputs"></label>
<label style="width: auto" for="node-input-motion"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-motion"> <span data-i18n="sensehat.label.motionEvents"></label>
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.motionEventsExamples"></div>
</div>
<div class="form-row">
<label></label>
<label style="width: auto" for="node-input-env"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-env"> <span data-i18n="sensehat.label.environmentEvents"></label>
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.environmentEventsExamples"></div>
</div>
<div class="form-row">
<label></label>
<label style="width: auto" for="node-input-stick"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-stick"> <span data-i18n="sensehat.label.joystickEvents"></label>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
</script>
<script type="text/x-red" data-template-name="rpi-sensehat out">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
</script>
<script type="text/x-red" data-help-name="rpi-sensehat in">
<p>Raspberry Pi Sense HAT input node.</p>
<p>This node sends readings from the various sensors on the Sense HAT,
grouped into three sets; motion events, environment events and joystick events.</p>
<p><b>Motion events</b></p>
<p>Motion events include readings from the accelerometer, gyroscope and magnetometer,
as well as the current compass heading. They are sent at a rate of approximately 10
per second. The <code>topic</code> is set to <code>motion</code> and the
<code>payload</code> is an object with the following values:</p>
<ul>
<li><code>acceleration.x/y/z</code> : the acceleration intensity in Gs</li>
<li><code>gyroscope.x/y/z</code> : the rotational intensity in radians/s</li>
<li><code>orientation.roll/pitch/yaw</code> : the angle of the axis in degrees</li>
<li><code>compass</code> : the direction of North in degrees</li>
</ul>
<p><b>Environment events</b></p>
<p>Environment events include readings from the temperature, humidity and pressure
sensors. They are sent at a rate of approximately 1 per second. The <code>topic</code>
is set to <code>environment</code> and the <code>payload</code> is an object
with the following values:</p>
<ul>
<li><code>temperature</code> : degrees Celsius</li>
<li><code>humidity</code> : percentage of relative humidity</li>
<li><code>pressure</code> : Millibars</li>
</ul>
<p><b>Joystick events</b></p>
<p>Joystick events are sent when the Sense HAT joystick is interacted with. The
<code>topic</code> is set to <code>joystick</code> and the <code>payload</code>
is an object with the following values:</p>
<ul>
<li><code>key</code> : one of <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code>, <code>ENTER</code></li>
<li><code>state</code> : the state of the key:
<ul>
<li><code>0</code> : the key has been released</li>
<li><code>1</code> : the key has been pressed</li>
<li><code>2</code> : the key is being held down</li>
</ul>
</li>
</ul>
</script>
<script type="text/x-red" data-help-name="rpi-sensehat out">
<p>Raspberry Pi Sense HAT output node.</p>
<p>This node sends commands to the 8x8 LED display on the Sense HAT.</p>
<p>Commands are sent to the node in <code>msg.payload</code>. Multiple commands can
be sent in a single message by separating them with newline (\n) characters. You must
use a function node or a change node (jsonata expression) when using the newline (\n)
character to create a payload containing multiple commands.<p>
<p><b>Set the colour of individual pixels</b></p>
<p>Format: <code>&lt;x&gt;,&lt;y&gt;,&lt;colour&gt;</code>
<p><code>x</code> and <code>y</code> must either be a value from 0 to 7, a
<code>*</code> to indicate the entire row or column, or a range such as <code>3-6</code>.</p>
<p><code>colour</code> must be one of:
<ul>
<li>the well-known <a href="https://en.wikipedia.org/wiki/Web_colors" target="_new">HTML colour names</a>
- eg <code>red</code> or <code>aquamarine</code>,</li>
<li>the <a href="http://cheerlights.com/cheerlights-api/">CheerLights colour names</a>,</li>
<li>a HEX colour value - eg <code>#aa9900</code></li>
<li>an RGB triple - <code>190,255,0</code></li>
<li>or simply <code>off</code></li>
</ul>
<p><i>Examples</i></p>
<p>To set the entire screen to red:</p>
<p><code>*,*,red</code></p>
<p>To set the four corners of the display to red, green (#00ff00), yellow and blue (0,0,255):</p>
<p><code>0,0,red,0,7,#00ff00,7,7,yellow,7,0,0,0,255</code></p>
<p>To set a 3-pixel wide column to purple:</p>
<p><code>4-6,*,purple</code></p>
<p><b>Rotate the screen</b></p>
<p>Format: <code>R&lt;angle&gt;</code></p>
<p><code>angle</code> must be 0, 90, 180 or 270.</p>
<p>Example: <code>R180</code></p>
<p><b>Flip the screen</b></p>
<p>Format: <code>F&lt;axis&gt;</code></p>
<p><code>axis</code> must be either <code>H</code> or <code>V</code> to flip on
the horizontal or vertical axis respectively.</p>
<p>Example: <code>FV</code></p>
<p><b>Scroll a message</b></p>
<p>If <code>msg.payload</code> is not recognised as any of the above commands,
it is treated as a text message to be scrolled across the screen.</p>
<p>If the text is a single character, it will be displayed without scrolling.
To scroll a single character, append a blank space after it - <code>"A "</code>.</p>
<p>The following message properties can be used to customise the appearance:</p>
<ul>
<li><code>msg.color</code> - the colour of the text, default: <code>white</code></li>
<li><code>msg.background</code> - the colour of the background, default: <code>off</code></li>
<li><code>msg.speed</code> - the scroll speed. A value in the range 1 (slower) to 5 (faster), default: <code>3</code></li>
</ul>
<p><b>Set the screen brightness</b></p>
<p>Format: <code>D&lt;level&gt;</code></p>
<p><code>level</code> must be 0 (low) or 1 (high).</p>
<p>Example: <code>D1</code></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('rpi-sensehat in',{
category: 'Raspberry Pi',