1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Update the 'Node Help' for the pi-sense-hat node (#447)

*  Update the 'Node Help'

Expanded the explanation for using multiple commands.
Provided examples for Rotate, Flip and Display.

Added examples for rotate, flip and screen brightness and added line to multiple messages explaination.

changed the Flip format from 'R' to 'F'
This commit is contained in:
juggledad 2018-05-30 06:12:26 -04:00 committed by Dave Conway-Jones
parent 38e469464f
commit 318a75c41b
2 changed files with 16 additions and 3 deletions

View File

@ -71,7 +71,9 @@ Joystick events are sent when the Sense HAT joystick is interacted with. The
This node sends commands to the 8x8 LED display on the Sense HAT.
Commands are sent to the node in `msg.payload`. Multiple commands can
be sent in a single message by separating them with newline (\n) characters.
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.
#### Set the colour of individual pixels
@ -103,12 +105,16 @@ Format: `R<angle>`
`angle` must be 0, 90, 180 or 270.
Example: `R180`
#### Flip the screen
Format: `R<axis>`
Format: `F<axis>`
`axis` must be either `H` or `V` to flip on the horizontal or vertical axis respectively.
Example: `FV`
#### Scroll a message
If `msg.payload` is not recognised as any of the above commands, it is treated
@ -128,3 +134,5 @@ The following message properties can be used to customise the appearance:
Format: `D<level>`
`level` must be 0 (low) or 1 (high).
Example: `D1`

View File

@ -73,7 +73,9 @@ is an object with the following values:</p>
<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.<p>
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>
@ -100,11 +102,13 @@ be sent in a single message by separating them with newline (\n) characters.<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,
@ -121,6 +125,7 @@ To scroll a single character, append a blank space after it - <code>"A "</code>.
<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',{