Difference between revisions of "Component: RGB Xmas Tree (Misc Circuit)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | MatrixTSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray;...") |
|||
| Line 15: | Line 15: | ||
Component complete with macros and simultion to drive the MatrixTSL RGB Xmas Tree decoration. | Component complete with macros and simultion to drive the MatrixTSL RGB Xmas Tree decoration. | ||
| − | ==Component | + | ==Component Source Code== |
| − | + | Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_XmasTree.fcfx FC_Comp_Source_XmasTree.fcfx] | |
==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 320: | Line 324: | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pin Connections | ||
|- | |- | ||
|- | |- | ||
| Line 346: | Line 354: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties | ||
| + | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
| Line 361: | Line 373: | ||
|- | |- | ||
| colspan="2" | Performs a simple LED test routine on start up. LEDs should all light up white, red, green and blue in second intervals. | | colspan="2" | Performs a simple LED test routine on start up. LEDs should all light up white, red, green and blue in second intervals. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|} | |} | ||
Revision as of 17:52, 9 November 2022
| 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 for the component source code: 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.
Downloadable macro reference
| 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 | |
| Randomises the colour to a specific LED | |
| LED | |
| LED 0 to NumLEDs - 1 | |
| Return | |
| 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 | |
| Plays the Jingle Bells tune using the audio driver. | |
| Return | |
| SetLEDs | |
| Sets the colour of all the LEDs. Red = 3-bit, Green = 3-bit, Blue = 2-bit 0bBBGGGRRR | |
| Colour | |
| Return | |
| CheckSwitch | |
| Checks to see if the switch is pressed. Returns 1 to indicate a press and 0 to indicate not pressed. | |
| Return | |
| 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 | |
| Randomises the colour of all the LEDs | |
| Return | |
| 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 | |
| Starts up the LED PWM and Audio software driver. | |
| Return | |