Component: LED Cube (Misc Circuit): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 75: | Line 75: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Clear''' | ||
|- | |- | ||
| colspan="2" | Clears the contents of the display to 0x0000 | | colspan="2" | Clears the contents of the display to 0x0000 | ||
| Line 94: | Line 94: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ConvColourToRGB''' | ||
|- | |- | ||
| colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | | colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | ||
| Line 113: | Line 113: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ConvRGBToColour''' | ||
|- | |- | ||
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions. | | colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions. | ||
| Line 142: | Line 142: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayCharacter''' | ||
|- | |- | ||
| colspan="2" | This macro allows a character to be displayed on the screen | | colspan="2" | This macro allows a character to be displayed on the screen | ||
| Line 201: | Line 201: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawCuboid''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 3D cuboid onto the LEDs | | colspan="2" | Draws a basic 3D cuboid onto the LEDs | ||
| Line 260: | Line 260: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawLine''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 3D line onto the LEDs | | colspan="2" | Draws a basic 3D line onto the LEDs | ||
| Line 314: | Line 314: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetColour''' | ||
|- | |- | ||
| colspan="2" | Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | | colspan="2" | Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | ||
| Line 343: | Line 343: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel. | | colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel. | ||
| Line 357: | Line 357: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PWMTimer''' | ||
|- | |- | ||
| colspan="2" | Interrupt driven macro to clock out the signals to the LEDs in the cube. To be called as part of a high frequency hardware timer interrupt or software loop to drive the cube hardware, Min Frequency = 60(Hz) * 8(Height) * 32(5-bitColourChannelValue) | | colspan="2" | Interrupt driven macro to clock out the signals to the LEDs in the cube. To be called as part of a high frequency hardware timer interrupt or software loop to drive the cube hardware, Min Frequency = 60(Hz) * 8(Height) * 32(5-bitColourChannelValue) | ||
| Line 371: | Line 371: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ResetRotations''' | ||
|- | |- | ||
| colspan="2" | Resets the rotation count variables allowing for a new rotation to be started | | colspan="2" | Resets the rotation count variables allowing for a new rotation to be started | ||
| Line 385: | Line 385: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateDisplay''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 419: | Line 419: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellXY''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 443: | Line 443: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellXZ''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 467: | Line 467: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellYZ''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 491: | Line 491: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetColour''' | ||
|- | |- | ||
| colspan="2" | Sets a pixel colour in the none active buffer using a 16-bit colour value Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | | colspan="2" | Sets a pixel colour in the none active buffer using a 16-bit colour value Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | ||
| Line 525: | Line 525: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ShiftDisplay''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 564: | Line 564: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SwitchBuffers''' | ||
|- | |- | ||
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations. | | colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations. | ||
| Line 584: | Line 584: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Ben Rowland 2014 |
| Version | 1.0 |
| Category | Misc Circuit |
LED Cube component
LED Cube component for driving 3D arrays of LEDs. A typical cube could consist of 4x4x4 or 8x8x8 but does not necessarily need to be a cuboid.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LEDCUBE.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LEDCUBE.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Clear
| Clear | |
| Clears the contents of the display to 0x0000 | |
| SwitchBuffers | |
| 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone | |
| Return | |
ConvColourToRGB
| ConvColourToRGB | |
| Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | |
| Colour | |
| Return | |
ConvRGBToColour
| ConvRGBToColour | |
| Converts RGB values into a single UINT colour parameter to use with other functions. | |
| Red | |
| Green | |
| Blue | |
| Return | |
DisplayCharacter
DrawCuboid
DrawLine
| DrawLine | |
| Draws a basic 3D line onto the LEDs | |
| X1 | |
| Y1 | |
| Z1 | |
| X2 | |
| Y2 | |
| Z2 | |
| Colour | |
| SwitchBuffers | |
| Return | |
GetColour
| GetColour | |
| Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | |
| X | |
| Y | |
| Z | |
| Return | |
Initialise
| Initialise | |
| Sets up the data memory and draws the simulated LED cube on the panel. | |
| Return | |
PWMTimer
ResetRotations
| ResetRotations | |
| Resets the rotation count variables allowing for a new rotation to be started | |
| Return | |
RotateDisplay
RotateShellXY
| RotateShellXY | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
RotateShellXZ
| RotateShellXZ | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
RotateShellYZ
| RotateShellYZ | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
SetColour
ShiftDisplay
SwitchBuffers