From 101745c6a4a2c6a186be48182d48814177840c65 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Thu, 29 Nov 2018 23:14:58 +0100 Subject: :construction: Chenged things, and written some docs --- docs/SUMMARY.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/SUMMARY.md (limited to 'docs/SUMMARY.md') diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..84228c7 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,10 @@ +# Summary + +* [Introduction](README.md) +* [Usage](Usage/README.md) + * [Install](Usage/Install.md) + * [Configuration](Usage/Configuration.md) + * [CLI](Usage/CLI.md) +* Contributing + * Modules + * [CompileAndRun](Contributing/Modules/CompileAndRun.md) -- cgit v1.2.3 From 227b9e7d22cddb45deee1558e51d9b792b31f12b Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Sat, 1 Dec 2018 00:26:50 +0100 Subject: :memo: Written docs for supportlib --- docs/SUMMARY.md | 2 + docs/Scripting/SupportLib/README.md | 66 +++ docs/Usage/Configuration.md | 7 +- docs/_book/Scripting/SupportLib/index.html | 458 +++++++++++++++++++++ docs/_book/Usage/CLI.html | 38 +- docs/_book/Usage/Configuration.html | 47 ++- docs/_book/Usage/Install.html | 38 +- docs/_book/Usage/index.html | 38 +- docs/_book/index.html | 38 +- docs/_book/search_index.json | 2 +- docs/_book/service-worker.js | 2 +- docs/book.json | 2 +- .../pythonSupportFiles/LuxcenaNeo/Matrix.py | 49 +++ .../pythonSupportFiles/LuxcenaNeo/Strip.py | 27 +- 14 files changed, 783 insertions(+), 31 deletions(-) create mode 100644 docs/Scripting/SupportLib/README.md create mode 100644 docs/_book/Scripting/SupportLib/index.html create mode 100644 src/compileAndRun/pythonSupportFiles/LuxcenaNeo/Matrix.py (limited to 'docs/SUMMARY.md') diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 84228c7..025a79c 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -5,6 +5,8 @@ * [Install](Usage/Install.md) * [Configuration](Usage/Configuration.md) * [CLI](Usage/CLI.md) +* Scripting + * [Support Library](Scripting\SupportLib/README.md) * Contributing * Modules * [CompileAndRun](Contributing/Modules/CompileAndRun.md) diff --git a/docs/Scripting/SupportLib/README.md b/docs/Scripting/SupportLib/README.md new file mode 100644 index 0000000..537a6ba --- /dev/null +++ b/docs/Scripting/SupportLib/README.md @@ -0,0 +1,66 @@ +# Support Library + +--- + +## `class` Strip +This is the object you are refeering to when you want to do things with LED's. +You shouldn't have to do instantiate your own new strip-object as you can use the one +set up by the software itself. +```python +LuxcenaNeo.strip +or +neo.strip +``` + + +### Strip.show() +Display all the changes made to the LEDs, on the actual LEDs. + +### Strip.setPixelColor(`n`, `color`) +Set LED at position n to the provided 24-bit color value (in RGB order). + +### Strip.setPixelColorXY(`x`, `y`, `color`) +Set LED at position (x, y) in the defined matrix to the provided 24-bit color value (in RGB order). + +### Strip.setPixelColorRGB(`n`, `red`, `green`, `blue`, `white = 0`) +Set LED at position n to the provided red, green, and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity). + +### Strip.setPixelColorXYRGB(`x`, `y`, `red`, `green`, `blue`, `white = 0`) +Set LED at position (x, y) in the defined matrix to the provided red, green, and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity). + +### Strip.setSegmentColorRGB(`segment`, `red`, `green`, `blue`, `white = 0`) +Set a whole segment to the provided red, green and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity). + +### Strip.setBrightness(`brightness`) +Scale each LED in the buffer by the provided brightness. A brightness +of 0 is the darkest and 255 is the brightest. + +### Strip.getBrightness(): +Get the brightness value for each LED in the buffer. A brightness +of 0 is the darkest and 255 is the brightest. + +### Strip.getPixels(): +Return an object which allows access to the LED display data as if +it were a sequence of 24-bit RGB values. + +### Strip.numPixels(): +Return the number of pixels in the display. + +### Strip.getPixelColor(`n`) +Get the 24-bit RGB color value for the LED at position n. + +--- + +## Color(`red`, `green`, `blue`, `white = 0`) +Convert the provided red, green, blue color to a 24-bit color value. +Each color component should be a value 0-255 where 0 is the lowest intensity +and 255 is the highest intensity. + +## hexColor(`value`) +Convert the provided hexadecimal color to a 24-bit color value. diff --git a/docs/Usage/Configuration.md b/docs/Usage/Configuration.md index 5a839e5..f13d639 100644 --- a/docs/Usage/Configuration.md +++ b/docs/Usage/Configuration.md @@ -43,11 +43,12 @@ This is a two dimensonal array, used to arrange the segments in a matrix of your ```json "segments": [10, 10, 10, 10, 10, 10, 10, 10, 10], "matrix": [ - [0, 1, 2], - [3, 4, 5], - [6, 7, 8] + [[0, false], [1, true], [2, false]], + [[3, true], [4, false], [5, true]], + [[6, false], [7, true], [8, false]] ] ``` +Each entry looks is a list, with two parameters, `[, ]` {% hint style='danger' %} If you don't have a reference to all the segments or something, the matrix setup will fail. And fall back to 'segmentsconfiguration' {% endhint %} diff --git a/docs/_book/Scripting/SupportLib/index.html b/docs/_book/Scripting/SupportLib/index.html new file mode 100644 index 0000000..a94c1da --- /dev/null +++ b/docs/_book/Scripting/SupportLib/index.html @@ -0,0 +1,458 @@ + + + + + + + Support Library · Luxcena-Neo wiki + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+ +
+ +
+ + + + + + + + +
+
+ +
+
+ +
+ +

Support Library

+
+

class Strip

+

This is the object you are refeering to when you want to do things with LED's. +You shouldn't have to do instantiate your own new strip-object as you can use the one +set up by the software itself.

+
LuxcenaNeo.strip
+or
+neo.strip
+
+

Strip.show()

+

Display all the changes made to the LEDs, on the actual LEDs.

+

Strip.setPixelColor(n, color)

+

Set LED at position n to the provided 24-bit color value (in RGB order).

+

Strip.setPixelColorXY(x, y, color)

+

Set LED at position (x, y) in the defined matrix to the provided 24-bit color value (in RGB order).

+

Strip.setPixelColorRGB(n, red, green, blue, white = 0)

+

Set LED at position n to the provided red, green, and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity).

+

Strip.setPixelColorXYRGB(x, y, red, green, blue, white = 0)

+

Set LED at position (x, y) in the defined matrix to the provided red, green, and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity).

+

Strip.setSegmentColorRGB(segment, red, green, blue, white = 0)

+

Set a whole segment to the provided red, green and blue color. +Each color component should be a value from 0 to 255 (where 0 is the +lowest intensity and 255 is the highest intensity).

+

Strip.setBrightness(brightness)

+

Scale each LED in the buffer by the provided brightness. A brightness +of 0 is the darkest and 255 is the brightest.

+

Strip.getBrightness():

+

Get the brightness value for each LED in the buffer. A brightness +of 0 is the darkest and 255 is the brightest.

+

Strip.getPixels():

+

Return an object which allows access to the LED display data as if +it were a sequence of 24-bit RGB values.

+

Strip.numPixels():

+

Return the number of pixels in the display.

+

Strip.getPixelColor(n)

+

Get the 24-bit RGB color value for the LED at position n.

+
+

Color(red, green, blue, white = 0)

+

Convert the provided red, green, blue color to a 24-bit color value. +Each color component should be a value 0-255 where 0 is the lowest intensity +and 255 is the highest intensity.

+

hexColor(value)

+

Convert the provided hexadecimal color to a 24-bit color value.

+ + +
+ +
+
+
+ +

results matching ""

+
    + +
    +
    + +

    No results matching ""

    + +
    +
    +
    + +
    +
    + +
    + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_book/Usage/CLI.html b/docs/_book/Usage/CLI.html index d7519bd..bae9eda 100644 --- a/docs/_book/Usage/CLI.html +++ b/docs/_book/Usage/CLI.html @@ -187,6 +187,38 @@ + Scripting + + + + + + + + + +
  • + + + + Contributing @@ -196,7 +228,7 @@