Component: RGB Xmas Tree (Misc Circuit): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 73: | Line 73: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckAudio''' | ||
|- | |- | ||
| colspan="2" | Checks to see if the audio circuit is current outputting a tone. Returns 1 to indicate audio active and 0 to indicate not active. | | colspan="2" | Checks to see if the audio circuit is current outputting a tone. Returns 1 to indicate audio active and 0 to indicate not active. | ||
| Line 87: | Line 87: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckSwitch''' | ||
|- | |- | ||
| colspan="2" | Checks to see if the switch is pressed. Returns 1 to indicate a press and 0 to indicate not pressed. | | colspan="2" | Checks to see if the switch is pressed. Returns 1 to indicate a press and 0 to indicate not pressed. | ||
| Line 101: | Line 101: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetLED''' | ||
|- | |- | ||
| colspan="2" | Directly read the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | | colspan="2" | Directly read the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | ||
| Line 120: | Line 120: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Starts up the LED PWM and Audio software driver. | | colspan="2" | Starts up the LED PWM and Audio software driver. | ||
| Line 134: | Line 134: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''JingleBells''' | ||
|- | |- | ||
| colspan="2" | Plays the Jingle Bells tune using the audio driver. | | colspan="2" | Plays the Jingle Bells tune using the audio driver. | ||
| Line 148: | Line 148: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''MoveToColour''' | ||
|- | |- | ||
| colspan="2" | Generates a colour value based on the input colour parameters and transitions one of the LEDs to the new colour. Remains in the function until the new colour has been reached. | | colspan="2" | Generates a colour value based on the input colour parameters and transitions one of the LEDs to the new colour. Remains in the function until the new colour has been reached. | ||
| Line 187: | Line 187: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PlayNote''' | ||
|- | |- | ||
| colspan="2" | Plays a specific note for the length of time specified. | | colspan="2" | Plays a specific note for the length of time specified. | ||
| Line 211: | Line 211: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RandomLED''' | ||
|- | |- | ||
| colspan="2" | Randomises the colour to a specific LED | | colspan="2" | Randomises the colour to a specific LED | ||
| Line 230: | Line 230: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RandomLEDs''' | ||
|- | |- | ||
| colspan="2" | Randomises the colour of all the LEDs | | colspan="2" | Randomises the colour of all the LEDs | ||
| Line 244: | Line 244: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetColour''' | ||
|- | |- | ||
| colspan="2" | Generates a colour value based on the input colour parameters and asigns it to one of the LEDs. | | colspan="2" | Generates a colour value based on the input colour parameters and asigns it to one of the LEDs. | ||
| Line 278: | Line 278: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetColours''' | ||
|- | |- | ||
| colspan="2" | Generates a colour value based on the input colour parameters and asigns it to all of the LEDs. | | colspan="2" | Generates a colour value based on the input colour parameters and asigns it to all of the LEDs. | ||
| Line 307: | Line 307: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetLED''' | ||
|- | |- | ||
| colspan="2" | Directly sets the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | | colspan="2" | Directly sets the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | ||
| Line 331: | Line 331: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetLEDs''' | ||
|- | |- | ||
| colspan="2" | Sets the colour of all the LEDs. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | | colspan="2" | Sets the colour of all the LEDs. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | ||
| Line 350: | Line 350: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WaitAudio''' | ||
|- | |- | ||
| colspan="2" | Checks to see if the audio circuit is current outputting a tone. If it is then the macro will wait until the audio is free again. | | colspan="2" | Checks to see if the audio circuit is current outputting a tone. If it is then the macro will wait until the audio is free again. | ||
| Line 370: | Line 370: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Pin Connections | ||
|- | |- | ||
|- | |- | ||
| Line 403: | Line 403: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | LED Properties | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | MatrixTSL |
| Version | 1.0 |
| Category | Misc Circuit |
RGB Xmas Tree component
Component complete with macros and simultion to drive the MatrixTSL RGB Xmas Tree decoration.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_XmasTree.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_XmasTree.fcfx
Detailed description
No detailed description exists yet for this component
Examples
For more information please refer to the Xmas Tree blog post.
Macro reference
CheckAudio
| CheckAudio | |
| Checks to see if the audio circuit is current outputting a tone. Returns 1 to indicate audio active and 0 to indicate not active. | |
| Return | |
CheckSwitch
| CheckSwitch | |
| Checks to see if the switch is pressed. Returns 1 to indicate a press and 0 to indicate not pressed. | |
| Return | |
GetLED
| GetLED | |
| Directly read the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | |
| LED | |
| LED 0 to NumLEDs - 1 | |
| Return | |
Initialise
| Initialise | |
| Starts up the LED PWM and Audio software driver. | |
| Return | |
JingleBells
| JingleBells | |
| Plays the Jingle Bells tune using the audio driver. | |
| Return | |
MoveToColour
PlayNote
| PlayNote | |
| Plays a specific note for the length of time specified. | |
| Note | |
| 0-59 - 0=C, 1=C#, 2=D, 3=Eb, 4=E, 5=F, 6=F#, 7=G, 8=G#, 9=A, 10=Bb, 11=B, 12=C... | |
| Length | |
| Return | |
RandomLED
| RandomLED | |
| Randomises the colour to a specific LED | |
| LED | |
| LED 0 to NumLEDs - 1 | |
| Return | |
RandomLEDs
| RandomLEDs | |
| Randomises the colour of all the LEDs | |
| Return | |
SetColour
SetColours
SetLED
| SetLED | |
| Directly sets the colour of a single LED. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | |
| LED | |
| LED 0 to NumLEDs - 1 | |
| Colour | |
| Return | |
SetLEDs
| SetLEDs | |
| Sets the colour of all the LEDs. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | |
| Colour | |
| Return | |
WaitAudio