From 4189c0c988daa939be0e8ec979ce0ae0563c4b7d Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Mon, 12 Dec 2022 14:13:40 +0100 Subject: Create docs from python code --- public/docs/Scripting/Strip/index.html | 1207 ++++++++++++++++++++++++++++++++ 1 file changed, 1207 insertions(+) create mode 100644 public/docs/Scripting/Strip/index.html (limited to 'public/docs/Scripting/Strip/index.html') diff --git a/public/docs/Scripting/Strip/index.html b/public/docs/Scripting/Strip/index.html new file mode 100644 index 0000000..d17627c --- /dev/null +++ b/public/docs/Scripting/Strip/index.html @@ -0,0 +1,1207 @@ + + + + + + + + + + + + + + + + Strip - Luxcena Neo Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + +

Documentation for strip

+ + +
+ + + +

+ luxcena_neo.strip.Strip + + +

+ + +
+ + +

Class representing a led-strip,

+

If you are using the NeoBehaviour runtime, an pre-configured instance of this will +be setup in your module with the name strip.

+ +

Attributes:

+ + + + + + + + + + + + + + + +
NameTypeDescription
SEGMENTS + list[int] +

A list of the configured segments.

+ + + + + +
+ + + + + + + +
+ + + +

+brightness + + + writable + property + + +

+ + +
+ +

The current brightness.

+
+ +
+ +
+ + + +

+power_on + + + writable + property + + +

+ + +
+ +

Wether the power action is on or not.

+
+ +
+ + + +
+ + + +

+blank(auto_show=True) + +

+ + +
+ +

Will turn off all pixels.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
auto_show + bool +

If set to true, strip.show() is called. Disable this if needed for some quicker animations.

+ True +
+ +
+ +
+ +
+ + + +

+get_pixel_color(n) + +

+ + +
+ +

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

+ +
+ +
+ +
+ + + +

+get_pixels() + +

+ + +
+ +

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

+ +
+ +
+ +
+ + + +

+num_pixels() + +

+ + +
+ +

Return the number of pixels in the display.

+ +
+ +
+ +
+ + + +

+set_pixel_color(n, *color) + +

+ + +
+ +

Set the color of the LED at position N.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
n + int +

The pixel to set.

+ required +
*color +

This will be interpreted as a color.

+ () +
+ +
+ +
+ +
+ + + +

+set_pixel_color_XY(x, y, *color) + +

+ + +
+ +

Set the color of a LED at position (x, y) in the matrix you have configured to a color.

+

Note: This will only print a warning message if you try to set pixels outside the matrix.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
x + int +

The x position.

+ required +
y + int +

The y position.

+ required +
*color +

This will be interpreted as a color.

+ () +
+ +
+ +
+ +
+ + + +

+set_segment_color(segment, *color) + +

+ + +
+ +

Set a whole segment to the provided color.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
segment + int +

The segment to set.

+ required +
*color +

This will be interpreted as a color.

+ () +
+ +
+ +
+ +
+ + + +

+set_strip_color(*color) + +

+ + +
+ +

Set all pixels in the strip to a color

+ +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
*color +

This will be interpreted as a color.

+ () +
+ +
+ +
+ +
+ + + +

+show() + +

+ + +
+ +

Update the display with the data from the LED buffer, you can think of it as a flush method.

+ +
+ +
+ + + +
+ +
+ +

+

A note on colors

+

Most methods which need colors takes a *color parameter. This is because it interprets multiple types of colors. The example below illustrates this, each of the lines has the exact same effect on the led strip. +

set_pixel_color(0, "#fafafa")
+set_pixel_color(0, 16448250)
+set_pixel_color(0, 250, 250, 250)
+set_pixel_color(0, (250, 250, 250))
+

+ + + + + + +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3