Component: RGB LED APA102C (LEDs): Difference between revisions
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| Line 554: | Line 554: | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | LED Properties | | width="90%" class="mtx-class-propfolder" | LED Properties | ||
|- | |- | ||
| Line 578: | Line 578: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Connections | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
| Line 587: | Line 587: | ||
| 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" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Connection Properties | | width="90%" class="mtx-class-propfolder" | Connection Properties | ||
|- | |- | ||
| Line 616: | Line 616: | ||
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. | | colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Simulation | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 2.0 |
| Category | LEDs |
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.
Detailed description
No detailed description exists yet for this component
Examples
Here is an example that lights the LEDs up Red, Green and then Blue for a second. The program then goes into a loop where a colour is assigned to LED0 and then shifted through the other chained LEDs. the colour assigned to LED0 will slowly fade and be slightly randmised to allow some colour variation during operation.
Macro reference
DrawCuboid3D
DrawLine2D
| DrawLine2D | |
| Draws a line on a 2D array of LEDs | |
| X1 | |
| Y1 | |
| X2 | |
| Y2 | |
| R | |
| G | |
| B | |
| Return | |
DrawLine3D
| DrawLine3D | |
| Draws a line on a 3D array of LEDs | |
| X1 | |
| Y1 | |
| Z1 | |
| X2 | |
| Y2 | |
| Z2 | |
| R | |
| G | |
| B | |
| Return | |
DrawRectangle2D
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 | |
GetLEDIndex2D
GetLEDIndex3D
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 | |
Refresh
| Refresh | |
| Clocks out the current colour data to the LEDs from the values stored in RAM | |
| Return | |
SetAllLEDColour
| SetAllLEDColour | |
| Sets the colour of all the LEDs in RAM | |
| R | |
| G | |
| B | |
| Return | |
SetBrightness
SetBrightnessByte
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 | |
ShiftLEDs1D
| ShiftLEDs1D | |
| Shifts the LED colours in 1D and wraps | |
| Direction | |
| 0 = Forwards, 1 = Backwards | |
| DataMode | |
| 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear | |
| Return | |
ShiftLEDs2D
ShiftLEDs3D
Property reference
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