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

Slight Unicorn hat READme changes

This commit is contained in:
Dave Conway-Jones 2016-01-12 22:53:24 +00:00
parent 705c7f76c4
commit 4ed955cecf
3 changed files with 13 additions and 9 deletions

View File

@ -8,8 +8,8 @@ Pre-requisites
-------------- --------------
The Unicorn HAT python drivers need to be pre-installed... see the The Unicorn HAT python drivers need to be pre-installed... see the
<a "href=http://learn.pimoroni.com/tutorial/unicorn-hat/getting-started-with-unicorn-hat"> <a href="http://learn.pimoroni.com/tutorial/unicorn-hat/getting-started-with-unicorn-hat" target="_new">
Pimorini Getting Started with Unicorn HAT</a> page. Pimoroni Getting Started with Unicorn HAT</a> page.
curl -sS get.pimoroni.com/unicornhat | bash curl -sS get.pimoroni.com/unicornhat | bash
@ -27,17 +27,20 @@ Usage
The background of the array can be configured using an 8x8 pixel sized The background of the array can be configured using an 8x8 pixel sized
png image, or by specifying a single colour using an r,g,b triple. png image, or by specifying a single colour using an r,g,b triple.
The brightness can also be set in the configuration. Defaults to 20% so as not to blind you. The brightness can also be set in the configuration. Defaults to 20% so as not
to blind you.
A pixel is set by **msg.payload** with a CSV string `x,y,r,g,b` , where x and y are 0 to 7, and r, g and b are 0 - 255. A pixel is set by **msg.payload** with a CSV string `x,y,r,g,b` , where x and y
are 0 to 7, and r, g and b are 0 - 255.
If `x` or `y` are set to `*` then the complete row or column can be set. If `x` or `y` are set to `*` then the complete row or column can be set.
Setting both `x` and `y` to `*` fills the background. Setting both `x` and `y` to `*` fills the background.
The background can also be set to a colour by setting **msg.payload** to an r,g,b triple. The background can also be set to a colour by setting **msg.payload** to an r,g,b triple.
Any msg with a **msg.topic** identifies a 'sprite' pixel, which can then be moved independently of the background. Any msg with a **msg.topic** identifies a 'sprite' pixel, which can then be moved
independently of the background. A 'sprite' can be a single pixel or a complete line.
Setting **msg.payload** to `0` will delete the sprite from the list. Setting **msg.payload** to `0` will delete the sprite from the list identified by **msg.topic**.
Setting **msg.payload** to `DEL` delete any sprites - leaving the background. Setting **msg.payload** to `DEL` delete any sprites - leaving the background.
@ -45,4 +48,4 @@ Setting **msg.payload** to `CLS` will clear the display to off and delete any sp
The overall brightness may be set by setting **msg.payload** to `brightness,nn`, where `nn` is 0 to 100. The overall brightness may be set by setting **msg.payload** to `brightness,nn`, where `nn` is 0 to 100.
The rotation may be set by setting ••msg.payload•• to 'rotate,rr', where 'rr' is 0, 90, 180 or 270.</p> The rotation may be set by setting ••msg.payload•• to 'rotate,rr', where 'rr' is 0, 90, 180 or 270.

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pi-unicorn-hat", "name" : "node-red-node-pi-unicorn-hat",
"version" : "0.0.1", "version" : "0.0.2",
"description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.", "description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.",
"dependencies" : { "dependencies" : {
"pngjs": "2.2.*" "pngjs": "2.2.*"

View File

@ -37,7 +37,8 @@
<p>A pixel is set by <b>msg.payload</b> with a CSV string <i>x,y,r,g,b</i> . <p>A pixel is set by <b>msg.payload</b> with a CSV string <i>x,y,r,g,b</i> .
If x or y are set to * then the complete row or column can be set.</p> If x or y are set to * then the complete row or column can be set.</p>
<p>The background can be set to a colour by setting msg.payload to an r,g,b triple.</p> <p>The background can be set to a colour by setting msg.payload to an r,g,b triple.</p>
<p>Any msg with a <b>msg.topic</b> identifies a 'sprite' pixel, which can then be moved independently.</p> <p>Any msg with a <b>msg.topic</b> identifies a 'sprite' pixel, which can then
be moved independently. A 'sprite' can be a single pixel or a complete row.</p>
<p>Setting msg.payload to 0 will delete the sprite from the list.</p> <p>Setting msg.payload to 0 will delete the sprite from the list.</p>
<p>Setting msg.payload to "CLS" will clear the display to off and delete any sprites.</p> <p>Setting msg.payload to "CLS" will clear the display to off and delete any sprites.</p>
<p>Setting msg.payload to "DEL" will delete any sprites, and leave the background.</p> <p>Setting msg.payload to "DEL" will delete any sprites, and leave the background.</p>