Difference between revisions of "Component: RGB Xmas Tree (Misc Circuit)"
From Flowcode Help
Jump to navigationJump to searchLine 57: | Line 57: | ||
For more information please refer to the [http://www.matrixtsl.com/blog/led-xmas-tree-project-2/ Xmas Tree blog post]. | For more information please refer to the [http://www.matrixtsl.com/blog/led-xmas-tree-project-2/ Xmas Tree blog post]. | ||
+ | |||
+ | |||
Line 62: | Line 64: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===PlayNote=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 85: | Line 88: | ||
+ | ===WaitAudio=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 103: | Line 107: | ||
+ | ===SetColours=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 131: | Line 136: | ||
+ | ===RandomLED=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 149: | Line 155: | ||
+ | ===MoveToColour=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 187: | Line 194: | ||
+ | ===SetLED=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 210: | Line 218: | ||
+ | ===JingleBells=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 223: | Line 232: | ||
+ | ===SetLEDs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 241: | Line 251: | ||
+ | ===CheckSwitch=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 254: | Line 265: | ||
+ | ===SetColour=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 287: | Line 299: | ||
+ | ===CheckAudio=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 300: | Line 313: | ||
+ | ===RandomLEDs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 313: | Line 327: | ||
+ | ===GetLED=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 331: | Line 346: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:53, 3 February 2023
Author | MatrixTSL |
Version | 1.0 |
Category | Misc Circuit |
Contents
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
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 |
WaitAudio
SetColours
RandomLED
![]() |
RandomLED |
Randomises the colour to a specific LED | |
![]() |
LED |
LED 0 to NumLEDs - 1 | |
![]() |
Return |
MoveToColour
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 |
JingleBells
![]() |
JingleBells |
Plays the Jingle Bells tune using the audio driver. | |
![]() |
Return |
SetLEDs
![]() |
SetLEDs |
Sets the colour of all the LEDs. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | |
![]() |
Colour |
![]() |
Return |
CheckSwitch
![]() |
CheckSwitch |
Checks to see if the switch is pressed. Returns 1 to indicate a press and 0 to indicate not pressed. | |
![]() |
Return |
SetColour
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 |
RandomLEDs
![]() |
RandomLEDs |
Randomises the colour of all the LEDs | |
![]() |
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 |