Jump to content

Component: LED WSxxxx Dummy (Outputs: LEDs)

From Flowcode Help
Revision as of 09:58, 27 January 2023 by Wiki bot (talk | contribs)
Author Matrix TSL
Version 1.1
Category Outputs: LEDs


LED WSxxxx Dummy component

A simple chained RGB LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Compatible with the WS2811, WS2812 and WS2812B Type Controller ICs. Allows RGB LEDs to be driven with full 24-bit colour depth. Allows single chains, 2D arrays and 3D cube formations to be simulated. Requires a high speed microcontroller to generate the critical timings to drive the device.

Component Source Code

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

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

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.7 * VDD minimum requirement. E.g. if VDD is 5V then the input voltage needs to be at least 3.5V.

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

Macro reference

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


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


DrawRectangle2D
 
- BYTE X1
 
- BYTE Y1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE DrawStyle
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return



Property reference

Properties

==Macro reference==

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


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


DrawRectangle2D
 
- BYTE X1
 
- BYTE Y1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE DrawStyle
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return



Property reference

Properties

==Macro reference==

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


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


DrawRectangle2D
 
- BYTE X1
 
- BYTE Y1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE DrawStyle
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return



Property reference

Properties

==Macro reference==

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


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


DrawRectangle2D
 
- BYTE X1
 
- BYTE Y1
 
- BYTE X2
 
- BYTE Y2
 
- BYTE DrawStyle
 
- BYTE R
 
- BYTE G
 
- BYTE B
 
- VOID Return



Property reference

Properties