Jump to content

Component: RGB LED WS2801 (LEDs): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(11 intermediate revisions by 2 users not shown)
Line 15: Line 15:
A simple chained RGB LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Allows RGB LEDs to be driven with full 24-bit colour depth. Allows single chains, 2D arrays and 3D cube formations to be simulated. Supports Bit Banged or SPI peripheral based data modes.
A simple chained RGB LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Allows RGB LEDs to be driven with full 24-bit colour depth. Allows single chains, 2D arrays and 3D cube formations to be simulated. Supports Bit Banged or SPI peripheral based data modes.


==Component Source Code==
==Detailed description==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LED_WS2801.fcfx FC_Comp_Source_LED_WS2801.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LED_WS2801.fcfx FC_Comp_Source_LED_WS2801.fcfx]
==Detailed description==




Line 66: Line 62:


==Examples==
==Examples==




Line 100: Line 98:
[[File:AnimLight2.jpg]]
[[File:AnimLight2.jpg]]


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightness'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Scaler
|-
| colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | LED
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ColIdx
|-
| colspan="2" | 0 = R, 1 = G, 2 = B 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightnessByte'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Scaler
|-
| colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D'''
|-
| colspan="2" | Draws a line on a 2D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | LED
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour'''
|-
| colspan="2" | Sets the colour of all the LEDs in RAM 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh'''
|-
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
|-
| colspan="2" | Shifts the LED colours in 1D and wraps  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Direction
|-
| colspan="2" | 0 = Forwards, 1 = Backwards 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
==Macro reference==
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D'''
|-
| colspan="2" | Draws a line on a 3D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D'''
|-
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
|-
| colspan="2" | Draws a basic 2D rectangle onto the LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D'''
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | X
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


 
===DrawCuboid3D===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D'''
|-
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. 
|-
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" class="mtx-class-macrohead" | '''DrawCuboid3D'''
| width="90%" | X
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z
|-
| colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D'''
|-
|-
| colspan="2" | Draws a basic 3D cuboid onto the LEDs 
| colspan="2" | Draws a basic 3D cuboid onto the LEDs 
Line 559: Line 174:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DrawLine2D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to  initialise all the WS2801 ICs in the chain. 
|-
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" class="mtx-class-macrohead" | '''DrawLine2D'''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs3D'''
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | X
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Z
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
 
 
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | LED Arrangement
|-
| colspan="2" | Controls the arrangement of the LEDs on the panel.  1D - Creates a straight line of LEDs 2D - Creates an X by Y Array of LEDs 3D - Creates an X by Y by Z Array of LEDs 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Count
|-
| colspan="2" | Total number of LEDs in the design 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Columns
|-
| colspan="2" | Number of horizontal LEDs - X axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Column Spacing
|-
| colspan="2" | X Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Rows
|-
| colspan="2" | Number of vertical LEDs - Y axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Row Spacing
|-
| colspan="2" | Y Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Layers
|-
| colspan="2" | Number of LED layers - Z axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Layer Spacing
|-
| colspan="2" | Z Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip X
|-
| colspan="2" | Flips the X axis if the LEDs are wired from the right hand side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Y
|-
| colspan="2" | Flips the Y axis if the LEDs are wired from the bottom side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Z
|-
| colspan="2" | Flips the Z axis if the LEDs are wired from the upper most side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Arrangement
|-
| colspan="2" | LEDs will likely be arranged in one of two ways. Parallel = Each row of LEDs run from left to right - easier to address but harder to wire. Alternating = Each row of LEDs runs in an alternating direction - harder to address but easier to wire. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Output Mode
|-
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Data Pin
|-
| colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Clock Pin
|-
| colspan="2" | LED Clock Pin - Connected to the Clock In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Scope Traces
|-
| colspan="2" | Selects if the scope traces are automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
|-
| colspan="2" | Selects if the console data is automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | API
|-
| colspan="2" |  
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightness'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Scaler
|-
| colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | LED
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ColIdx
|-
| colspan="2" | 0 = R, 1 = G, 2 = B 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightnessByte'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Scaler
|-
| colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D'''
|-
|-
| colspan="2" | Draws a line on a 2D array of LEDs 
| colspan="2" | Draws a line on a 2D array of LEDs 
Line 825: Line 223:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DrawLine3D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | LED
| width="90%" class="mtx-class-macrohead" | '''DrawLine3D'''
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour'''
|-
| colspan="2" | Sets the colour of all the LEDs in RAM 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh'''
|-
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
|-
| colspan="2" | Shifts the LED colours in 1D and wraps  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Direction
|-
| colspan="2" | 0 = Forwards, 1 = Backwards 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D'''
|-
|-
| colspan="2" | Draws a line on a 3D array of LEDs 
| colspan="2" | Draws a line on a 3D array of LEDs 
Line 980: Line 282:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DrawRectangle2D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D'''
|-
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. 
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | X
| width="90%" class="mtx-class-macrohead" | '''DrawRectangle2D'''
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
|-
|-
| colspan="2" | Draws a basic 2D rectangle onto the LEDs 
| colspan="2" | Draws a basic 2D rectangle onto the LEDs 
Line 1,056: Line 336:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLEDColour===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D'''
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | X
| width="90%" class="mtx-class-macrohead" | '''GetLEDColour'''
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D'''
|-
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z
|-
| colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D'''
|-
| colspan="2" | Draws a basic 3D cuboid onto the LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to  initialise all the WS2801 ICs in the chain. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs3D'''
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | X
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Z
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
 
 
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | LED Arrangement
|-
| colspan="2" | Controls the arrangement of the LEDs on the panel.  1D - Creates a straight line of LEDs 2D - Creates an X by Y Array of LEDs 3D - Creates an X by Y by Z Array of LEDs 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Count
|-
| colspan="2" | Total number of LEDs in the design 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Columns
|-
| colspan="2" | Number of horizontal LEDs - X axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Column Spacing
|-
| colspan="2" | X Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Rows
|-
| colspan="2" | Number of vertical LEDs - Y axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Row Spacing
|-
| colspan="2" | Y Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Layers
|-
| colspan="2" | Number of LED layers - Z axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Layer Spacing
|-
| colspan="2" | Z Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip X
|-
| colspan="2" | Flips the X axis if the LEDs are wired from the right hand side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Y
|-
| colspan="2" | Flips the Y axis if the LEDs are wired from the bottom side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Z
|-
| colspan="2" | Flips the Z axis if the LEDs are wired from the upper most side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Arrangement
|-
| colspan="2" | LEDs will likely be arranged in one of two ways. Parallel = Each row of LEDs run from left to right - easier to address but harder to wire. Alternating = Each row of LEDs runs in an alternating direction - harder to address but easier to wire. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Output Mode
|-
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Data Pin
|-
| colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Clock Pin
|-
| colspan="2" | LED Clock Pin - Connected to the Clock In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Scope Traces
|-
| colspan="2" | Selects if the scope traces are automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
|-
| colspan="2" | Selects if the console data is automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | API
|-
| colspan="2" |  
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightness'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Scaler
|-
| colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour'''
|-
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
Line 1,375: Line 360:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLEDIndex2D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightnessByte'''
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Scaler
|-
| colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D'''
|-
| colspan="2" | Draws a line on a 2D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | LED
|-
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''GetLEDIndex2D'''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour'''
|-
| colspan="2" | Sets the colour of all the LEDs in RAM 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh'''
|-
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
|-
| colspan="2" | Shifts the LED colours in 1D and wraps  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Direction
|-
| colspan="2" | 0 = Forwards, 1 = Backwards 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D'''
|-
| colspan="2" | Draws a line on a 3D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D'''
|-
|-
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. 
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. 
Line 1,619: Line 384:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLEDIndex3D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
|-
| colspan="2" | Draws a basic 2D rectangle onto the LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
|-
| colspan="2" |  
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''GetLEDIndex3D'''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D'''
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | X
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D'''
|-
|-
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. 
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. 
Line 1,728: Line 413:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Draws a basic 3D cuboid onto the LEDs 
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to  initialise all the WS2801 ICs in the chain. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 1,791: Line 427:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Refresh===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Refresh'''
|-
|-
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to  initialise all the WS2801 ICs in the chain. 
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM 
|-
|-
|-
|-
Line 1,804: Line 441:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetAllLEDColour===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs3D'''
| width="90%" class="mtx-class-macrohead" | '''SetAllLEDColour'''
|-
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
| colspan="2" | Sets the colour of all the LEDs in RAM 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
| width="90%" | R
|-
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
| width="90%" | G
|-
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Z
|-
| colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataMode
| width="90%" | B
|-
|-
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 1,837: Line 470:




 
===SetBrightness===
 
{| class="mtx-class-macrotable wikitable"
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | LED Arrangement
|-
| colspan="2" | Controls the arrangement of the LEDs on the panel.  1D - Creates a straight line of LEDs 2D - Creates an X by Y Array of LEDs 3D - Creates an X by Y by Z Array of LEDs 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Count
|-
| colspan="2" | Total number of LEDs in the design 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Columns
|-
| colspan="2" | Number of horizontal LEDs - X axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Column Spacing
|-
| colspan="2" | X Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Rows
|-
| colspan="2" | Number of vertical LEDs - Y axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Row Spacing
|-
| colspan="2" | Y Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Layers
|-
| colspan="2" | Number of LED layers - Z axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Layer Spacing
|-
| colspan="2" | Z Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip X
|-
| colspan="2" | Flips the X axis if the LEDs are wired from the right hand side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Y
|-
| colspan="2" | Flips the Y axis if the LEDs are wired from the bottom side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Z
|-
| colspan="2" | Flips the Z axis if the LEDs are wired from the upper most side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Arrangement
|-
| colspan="2" | LEDs will likely be arranged in one of two ways. Parallel = Each row of LEDs run from left to right - easier to address but harder to wire. Alternating = Each row of LEDs runs in an alternating direction - harder to address but easier to wire. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Output Mode
|-
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Data Pin
|-
| colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Clock Pin
|-
| colspan="2" | LED Clock Pin - Connected to the Clock In pin of the first WS8201 IC. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Scope Traces
|-
| colspan="2" | Selects if the scope traces are automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
|-
| colspan="2" | Selects if the console data is automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | API
|-
| colspan="2" |  
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightness'''
| width="90%" class="mtx-class-macrohead" | '''SetBrightness'''
|-
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
Line 1,968: Line 489:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetBrightnessByte===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour'''
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | LED
|-
| colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ColIdx
|-
| colspan="2" | 0 = R, 1 = G, 2 = B 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightnessByte'''
| width="90%" class="mtx-class-macrohead" | '''SetBrightnessByte'''
|-
|-
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
Line 2,009: Line 508:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetLEDColour===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D'''
|-
| colspan="2" | Draws a line on a 2D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour'''
| width="90%" class="mtx-class-macrohead" | '''SetLEDColour'''
|-
|-
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. 
Line 2,090: Line 542:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ShiftLEDs1D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour'''
|-
|-
| colspan="2" | Sets the colour of all the LEDs in RAM 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''ShiftLEDs1D'''
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh'''
|-
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
|-
|-
| colspan="2" | Shifts the LED colours in 1D and wraps  
| colspan="2" | Shifts the LED colours in 1D and wraps  
Line 2,154: Line 566:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ShiftLEDs2D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D'''
|-
| colspan="2" | Draws a line on a 3D array of LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z2
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | R
| width="90%" class="mtx-class-macrohead" | '''ShiftLEDs2D'''
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D'''
|-
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
|-
| colspan="2" | Draws a basic 2D rectangle onto the LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D'''
|-
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
Line 2,316: Line 595:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ShiftLEDs3D===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D'''
|-
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
|-
| colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Z
|-
| colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1) 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D'''
| width="90%" class="mtx-class-macrohead" | '''ShiftLEDs3D'''
|-
| colspan="2" | Draws a basic 3D cuboid onto the LEDs 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z1
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z2
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DrawStyle
|-
| colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | R
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | G
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | B
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to  initialise all the WS2801 ICs in the chain. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs3D'''
|-
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
Line 2,451: Line 627:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties
| width="90%" class="mtx-class-propfolder" | LED Properties
|-
|-
|-
|-
Line 2,476: Line 650:
|-
|-
| colspan="2" | Total number of LEDs in the design 
| colspan="2" | Total number of LEDs in the design 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Columns
|-
| colspan="2" | Number of horizontal LEDs - X axis 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
Line 2,487: Line 656:
| colspan="2" | X Spacing Between LEDs on the Panel 
| colspan="2" | X Spacing Between LEDs on the Panel 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" | LED Rows
| width="90%" class="mtx-class-propfolder" | Connections
|-
| colspan="2" | Number of vertical LEDs - Y axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Row Spacing
|-
| colspan="2" | Y Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | LED Layers
|-
| colspan="2" | Number of LED layers - Z axis 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Layer Spacing
|-
| colspan="2" | Z Spacing Between LEDs on the Panel 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip X
|-
| colspan="2" | Flips the X axis if the LEDs are wired from the right hand side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Y
|-
| colspan="2" | Flips the Y axis if the LEDs are wired from the bottom side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Flip Z
|-
| colspan="2" | Flips the Z axis if the LEDs are wired from the upper most side of the display. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Arrangement
|-
| colspan="2" | LEDs will likely be arranged in one of two ways. Parallel = Each row of LEDs run from left to right - easier to address but harder to wire. Alternating = Each row of LEDs runs in an alternating direction - harder to address but easier to wire. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
|-
|-
Line 2,536: Line 665:
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection Properties
| width="90%" class="mtx-class-propfolder" | Connection Properties
|-
|-
|-
|-
Line 2,565: Line 694:
| colspan="2" |  
| colspan="2" |  
|}
|}
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LED_WS2801.fcfx FC_Comp_Source_LED_WS2801.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LED_WS2801.fcfx FC_Comp_Source_LED_WS2801.fcfx]

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 2.0
Category LEDs


RGB LED WS2801 component

A simple chained RGB LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Allows RGB LEDs to be driven with full 24-bit colour depth. Allows single chains, 2D arrays and 3D cube formations to be simulated. Supports Bit Banged or SPI peripheral based data modes.

Detailed description

1D Configuration

In the 1D configuration each LED simply follows on from the last in a chain.


2D Configuration

In the 2D configuration each LED follows on from the last in a chain which travels back and forth through the columns a row at a time.


3D Configuration

In the 3D configuration each layer follows the 2D configuration with each layer then following on by mirroring the layer below. First layer connections are shown in Red and second layer connections are shown in Blue.


3V3 Microcontrollers

Note you may have to voltage shift the micro controller control pins to meet the 0.8 * VDD minimum requirement. E.g. if VDD is 5V then the input voltage needs to be at least 4V.

A simple buffer IC could be used to do the voltage shifting.


Examples

RGB Mood Light

A simple example using three potentiometers to set the individual Red, Green and Blue channels of the LED colour. MoodLight


Animated Light

A simple example which picks a random colour assigns it to the first LED, then shifts and repeats. AnimatedLightStrip


Animated Light Cascade

A simple example which picks a random colour assigns it to the first LED, then shifts and repeats. AnimatedLightCascade






Macro reference

DrawCuboid3D

DrawCuboid3D
Draws a basic 3D cuboid onto the LEDs 
- BYTE X1
 
- BYTE Y1
 
- BYTE Z1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE Z2
 
- BYTE DrawStyle
Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


DrawLine2D

DrawLine2D
Draws a line on a 2D array of LEDs 
- UINT X1
 
- UINT Y1
 
- UINT X2
 
- UINT Y2
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


DrawLine3D

DrawLine3D
Draws a line on a 3D array of LEDs 
- UINT X1
 
- UINT Y1
 
- UINT Z1
 
- UINT X2
 
- UINT Y2
 
- UINT Z2
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


DrawRectangle2D

DrawRectangle2D
Draws a basic 2D rectangle onto the LEDs 
- BYTE X1
 
- BYTE Y1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE DrawStyle
Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


GetLEDColour

GetLEDColour
Sets the colour of a single LED in RAM as a 1D array. 
- UINT LED
LED to change the colour / Range: 0 to (LED Count - 1) 
- BYTE ColIdx
0 = R, 1 = G, 2 = B 
- BYTE Return


GetLEDIndex2D

GetLEDIndex2D
Sets the index of a single LED in RAM as a 2D array. 
- UINT X
LED Column to change the colour / Range: 0 to (LED Column - 1) 
- UINT Y
LED Row to change the colour / Range: 0 to (LED Row - 1) 
- UINT Return


GetLEDIndex3D

GetLEDIndex3D
Gets the index of a single LED in RAM as a 3D array. 
- UINT X
LED Column to change the colour / Range: 0 to (LED Column - 1) 
- UINT Y
LED Row to change the colour / Range: 0 to (LED Row - 1) 
- UINT Z
LED Layer to change the colour / Range: 0 to (LED Layer - 1) 
- UINT Return


Initialise

Initialise
Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the WS2801 ICs in the chain. 
- VOID Return


Refresh

Refresh
Clocks out the current colour data to the LEDs from the values stored in RAM 
- VOID Return


SetAllLEDColour

SetAllLEDColour
Sets the colour of all the LEDs in RAM 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


SetBrightness

SetBrightness
Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
- FLOAT Scaler
Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness 
- VOID Return


SetBrightnessByte

SetBrightnessByte
Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments.  
- BYTE Scaler
Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness 
- VOID Return


SetLEDColour

SetLEDColour
Sets the colour of a single LED in RAM as a 1D array. 
- UINT LED
LED to change the colour / Range: 0 to (LED Count - 1) 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return


ShiftLEDs1D

ShiftLEDs1D
Shifts the LED colours in 1D and wraps  
- BYTE Direction
0 = Forwards, 1 = Backwards 
- BYTE DataMode
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
- VOID Return


ShiftLEDs2D

ShiftLEDs2D
Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
- INT X
Number of pixels to shift the display -1 to 1 / 0 = No Shift 
- INT Y
Number of pixels to shift the display -1 to 1 / 0 = No Shift 
- BYTE DataMode
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
- VOID Return


ShiftLEDs3D

ShiftLEDs3D
Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** 
- INT X
Number of pixels to shift the display -1 to 1 / 0 = No Shift 
- INT Y
Number of pixels to shift the display -1 to 1 / 0 = No Shift 
- INT Z
Number of pixels to shift the display -1 to 1 / 0 = No Shift 
- BYTE DataMode
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
- VOID Return


Property reference

Properties
LED Properties
LED Arrangement
Controls the arrangement of the LEDs on the panel. 1D - Creates a straight line of LEDs 2D - Creates an X by Y Array of LEDs 3D - Creates an X by Y by Z Array of LEDs 
LED Count
Total number of LEDs in the design 
Column Spacing
X Spacing Between LEDs on the Panel 
Connections
Output Mode
Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O  
Connection Properties
Data Pin
LED Data Pin - Connected to the Data In pin of the first WS8201 IC. 
Clock Pin
LED Clock Pin - Connected to the Clock In pin of the first WS8201 IC. 
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
API
 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_LED_WS2801.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_LED_WS2801.fcfx