Layouts
A layout (🚥) defines the positions of lights connected to a MoonLight device.
- The coordinates of each light are defined in a 3D coordinate space
- Coordinates needs to be specified in the order the lights are wired so MoonLight knows which light is first, which is second etc.
- For lights in a straight line (1D, e.g. LED strips or a LED bar), specify coordinates as [x,0,0]
- For lights in a flat area (2D, e.g. LED matrix), specify coordinates as [x,y,0]
- Multiple layout nodes can be defined which will be mapped in the order of the layouts
- MoonLight will use the layout definition to generate a mapping of the effects to a real world light layout. Most simple example is a panel which has a snake layout. The mapping will create a layer for effects where the snake layout is hidden.
- Layouts also assign groups of LEDs to esp32 GPIO pins.
Layout 🚥 Nodes
Below is a list of Layouts in MoonLight. Want to add a a Layout to MoonLight, see develop. See also Live scripts to add runtime effects.
Name | Preview | Controls | Remarks |
---|---|---|---|
Panel | Defines a 2D panel with width and height Wiring Order (orientation): horizontal (x), vertical (y), depth (z) X++: starts at Top or bottom, Y++: starts left or right snake aka serpentine layout |
||
Panels | Panel layout + Wiring order, directions and snake also for each panel | ||
Cube | Panel layout + depth Z++ starts front or back multidimensional snaking, good luck 😜 |
||
Rings | 241 LEDs in 9 rings | ||
Wheel | |||
Human Sized Cube | |||
Single Line | |||
Single Row | |||
SE16 | Layout(s) including pins for Stephan Electronics 16-Pin ESP32-S3 board see below |
Choosing pins
Choose the right pins with care. See also the IO module to see which pins can in general be used for LEDs (💡). But depending on a specific boards some pins might also be in use already.
Multiple layouts
Single line, single row or panel are suitable layouts to combine into a larger fixture.
SE16
16 channel LED strip driver by Stephane Electronics
- Leds Per Pin: the number of LEDs connected to each pin
- Pins Are Columns: are the LEDs on a pin a row of the effect (width is 1 (or 2) x ledsPerPin). If not set the LEDs are a column (height is 1 (or 2) x ledsPerPin)
- Mirrored Pins: If set it is assumed that LEDs are connected with increasing positions on 8 pins on one side of the board and decreasing positions on the 8 pins of the other side of the board. The resulting size will have a width of 8 and the height (or width) will be 2 * ledsPerPin. If not set, the width will be 16 and the height (or width) = ledsPerPin
- Pins: 47,48,21,38,14,39,13,40,12,41,11,42,10,2,3,1