aboutsummaryrefslogtreecommitdiff
path: root/docs/Scripting
diff options
context:
space:
mode:
authorJakob Stendahl <14180120+JakobST1n@users.noreply.github.com>2018-12-01 00:28:28 +0100
committerGitHub <noreply@github.com>2018-12-01 00:28:28 +0100
commit19df9946b438b38b9a4f3f57ad002981a1ae1eaf (patch)
treee8eb839a305502584e31e1b1a96c70406b9b6255 /docs/Scripting
parentfd7a1b51126f8b8f889807cb7d56bb3626a0e0b5 (diff)
parent7ec685de6e441af1f614bb9d18e25c047d21466b (diff)
downloadLuxcena-Neo-19df9946b438b38b9a4f3f57ad002981a1ae1eaf.tar.gz
Luxcena-Neo-19df9946b438b38b9a4f3f57ad002981a1ae1eaf.zip
Merge pull request #6 from JakobST1n/dev
Written docs, finished CLI
Diffstat (limited to 'docs/Scripting')
-rw-r--r--docs/Scripting/SupportLib/README.md66
1 files changed, 66 insertions, 0 deletions
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.