Difference between revisions of "Component: RGB LED APA102C (LEDs)"
From Flowcode Help
Jump to navigationJump to searchLine 77: | Line 77: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 83: | Line 85: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===SetBrightness=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 101: | Line 104: | ||
+ | ===GetLEDColour=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 124: | Line 128: | ||
+ | ===SetBrightnessByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 142: | Line 147: | ||
+ | ===DrawLine2D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 190: | Line 196: | ||
+ | ===SetLEDColour=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 223: | Line 230: | ||
+ | ===SetAllLEDColour=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 251: | Line 259: | ||
+ | ===Refresh=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 264: | Line 273: | ||
+ | ===ShiftLEDs1D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 287: | Line 297: | ||
+ | ===DrawLine3D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 345: | Line 356: | ||
+ | ===GetLEDIndex2D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 368: | Line 380: | ||
+ | ===DrawRectangle2D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 421: | Line 434: | ||
+ | ===ShiftLEDs2D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 449: | Line 463: | ||
+ | ===GetLEDIndex3D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 477: | Line 492: | ||
+ | ===DrawCuboid3D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 540: | Line 556: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 553: | Line 570: | ||
+ | ===ShiftLEDs3D=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:51, 3 February 2023
Author | Matrix TSL |
Version | 2.0 |
Category | LEDs |
Contents
RGB LED APA102C 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.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LED_APA102C.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LED_APA102C.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
SetBrightness
GetLEDColour
![]() |
GetLEDColour |
Sets the colour of a single LED in RAM as a 1D array. | |
![]() |
LED |
LED to change the colour / Range: 0 to (LED Count - 1) | |
![]() |
ColIdx |
0 = R, 1 = G, 2 = B | |
![]() |
Return |
SetBrightnessByte
DrawLine2D
![]() |
DrawLine2D |
Draws a line on a 2D array of LEDs | |
![]() |
X1 |
![]() |
Y1 |
![]() |
X2 |
![]() |
Y2 |
![]() |
R |
![]() |
G |
![]() |
B |
![]() |
Return |
SetLEDColour
![]() |
SetLEDColour |
Sets the colour of a single LED in RAM as a 1D array. | |
![]() |
LED |
LED to change the colour / Range: 0 to (LED Count - 1) | |
![]() |
R |
![]() |
G |
![]() |
B |
![]() |
Return |
SetAllLEDColour
![]() |
SetAllLEDColour |
Sets the colour of all the LEDs in RAM | |
![]() |
R |
![]() |
G |
![]() |
B |
![]() |
Return |
Refresh
![]() |
Refresh |
Clocks out the current colour data to the LEDs from the values stored in RAM | |
![]() |
Return |
ShiftLEDs1D
![]() |
ShiftLEDs1D |
Shifts the LED colours in 1D and wraps | |
![]() |
Direction |
0 = Forwards, 1 = Backwards | |
![]() |
DataMode |
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear | |
![]() |
Return |
DrawLine3D
![]() |
DrawLine3D |
Draws a line on a 3D array of LEDs | |
![]() |
X1 |
![]() |
Y1 |
![]() |
Z1 |
![]() |
X2 |
![]() |
Y2 |
![]() |
Z2 |
![]() |
R |
![]() |
G |
![]() |
B |
![]() |
Return |
GetLEDIndex2D
DrawRectangle2D
ShiftLEDs2D
GetLEDIndex3D
DrawCuboid3D
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. | |
![]() |
Return |
ShiftLEDs3D