Component: LED WSxxxx Dummy (Outputs: LEDs)

From Flowcode Help
Jump to navigationJump to search
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.

LED 1D x.png


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.

LED 2D x.png


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.

LED 3D x.png


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. FC6 Icon.png MoodLight MoodLight2.jpg


Animated Light

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






Macro reference

DrawRectangle2D

Fc9-comp-macro.png DrawRectangle2D
 
Fc9-u8-icon.png - BYTE X1
 
Fc9-u8-icon.png - BYTE Y1
 
Fc9-u8-icon.png - BYTE X2
 
Fc9-u8-icon.png - BYTE Y2
 
Fc9-u8-icon.png - BYTE DrawStyle
 
Fc9-u8-icon.png - BYTE R
 
Fc9-u8-icon.png - BYTE G
 
Fc9-u8-icon.png - BYTE B
 
Fc9-void-icon.png - VOID Return


GetLEDIndex2D

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


SetLEDColour

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


Property reference

Fc9-prop-icon.png Properties