diff --git a/hardware/neopixel/README.md b/hardware/neopixel/README.md index 9a5e83b5..cedbf794 100644 --- a/hardware/neopixel/README.md +++ b/hardware/neopixel/README.md @@ -28,24 +28,39 @@ The data pin of the pixels should be connected to physical pin 12 - GPIO 18 of t Usage ----- -Defaults to a bar chart style mode using configured foreground and background colours. -It can also display a needle (single pixel) type gauge. - -It can accept a number in **msg.payload** that can be either the number of pixels, -or a percentage of the total length. - -If you want to change the foreground colour, you can set **msg.payload** to a -comma separated string of `html_colour,length` or `length,html_colour` - To set the background just set **msg.payload** to an `html_colour` name. Here is a list of html_colour names. -You can also select shift modes where a single colour pixel is added to either -the start or the end of the strip, shifting all the others along by one. +It also accepts a string triple `rrr,ggg,bbb` or `#rrggbb` -The `nth` pixel can be set by **msg.payload** with a CSV string `n,r,g,b` , +#### Bar Chart + +Defaults style mode using configured foreground and background colours. The foreground colour is used to indicate the number of pixels or length required. + +It accepts a number in **msg.payload** that can be either the number of pixels, +or a percentage of the total length. + +If you want to change the foreground colour, you can set **msg.payload** to a +comma separated string of `html_colour,length` or `length,html_colour`. The foreground will then remain that colour until changed again. + +#### Needle + +It can also display a needle (single pixel) type gauge. +The rest of the pixels are set to the background colour on one side, and the foreground colour on the other side of the indicated pixel. + +If you want to change the needle colour, you can set **msg.payload** to a +comma separated string of `html_colour,length` or `length,html_colour`. + +#### Shift left and Shift right + +You can also select shift modes where a single colour pixel is added to either +the start or the end of the strip, shifting all the others along by one. In this mode the `msg.payload` can be specified as either an html colour name, an r,g,b triple or #rrggbb. + +#### Low level "API" + +The `nth` pixel of the string can be set by **msg.payload** with a CSV string `n,r,g,b` , where r, g and b are 0-255. -A range of pixels from `x` to `y` can be set by **msg.payload** +A range of pixels from position `x` to `y` can be set by **msg.payload** with a CSV string `x,y,r,g,b` diff --git a/hardware/neopixel/neopixel.html b/hardware/neopixel/neopixel.html index aa4745cd..4b8591ba 100644 --- a/hardware/neopixel/neopixel.html +++ b/hardware/neopixel/neopixel.html @@ -66,6 +66,7 @@ with a CSV string x,y,r,g,b

The pixels data line should be connected to Pi physical pin 12 - GPIO 18. Note: this may conflict with audio playback.

+

More info