Difference between revisions of "Component: LED (BL0167) (E-blocks 2)"

From Flowcode Help
Jump to navigationJump to search
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| E-blocks 2
 
| E-blocks 2
 
|}
 
|}
  
  
 +
==LED component==
 +
LED component to drive the E-blocks 2 BL0167 LED board. Provides eight individually addressable LEDs.
  
==[[File:Component Icon 103aab27_2ea3_483c_9710_fc3c495288a7.png|Image]] LED (BL0167) component==
+
==Component Source Code==
LED component to drive the E-blocks 2 BL0167 LED board.
 
Provides eight individually addressable LEDs.
 
  
There are component macros in flowcode 8 to turn a selected LED on or off, or you can even use macros to turn all LEDs on or off. Make sure the LED component is connected to the correct port in flowcode which corresponds to the port that it’s connected to on your E-blocks 2 upstream board. When selecting an individual LED to turn on or off you are asked for the index value (0-7), which is the large number shown underneath each LED on the E-blocks 2 board.
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_EBlocks2_LED_BL0167.fcfx FC_Comp_Source_EBlocks2_LED_BL0167.fcfx]
  
==Examples==
+
==Detailed description==
''<span style="color:red;">No additional examples</span>''
 
  
 +
''No detailed description exists yet for this component''
  
==Downloadable macro reference==
+
==Examples==
  
===<span style="font-weight: normal;"><u><tt>BarGraph</tt></u></span>===
 
Turns on the first N elements of the array - for generating bar graph metes etc.
 
  
'''Parameters'''
+
''<span style="color:red;">No additional examples</span>''
  
:[[Variable Types|BYTE]] ''Length''
 
::How many items to light up. Range 0-8
 
  
 +
==Downloadable macro reference==
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BarGraph'''
 +
|-
 +
| colspan="2" | Turns on the first N elements of the array - for generating bar graph metes etc.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Length
 +
|-
 +
| colspan="2" | How many items to light up. Range 0-8&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LEDOn'''
 +
|-
 +
| colspan="2" | Turns on the selected LED leaving the other LEDs as was.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | LED to switch on. Range: 0-7&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>LEDOn</tt></u></span>===
 
Turns on the selected LED leaving the other LEDs as was.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AllOn'''
 +
|-
 +
| colspan="2" | Switches On All LEDs.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]] ''Index''
 
::LED to switch on. Range: 0-7
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LEDOff'''
 +
|-
 +
| colspan="2" | Turns off the selected LED leaving the other LEDs as was.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | LED to switch off. Range: 0-7&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PointGraph'''
 +
|-
 +
| colspan="2" | Turns on the Indexed LED and turns all others off. Does nothing if the index is out of range.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | The LED to light. Range: 0-7&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>AllOn</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Switches On All LEDs.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteValue'''
 +
|-
 +
| colspan="2" | Write a number which is presented on the LEDs in binary.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | Value to write to the LEDs. Range: 0-255&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
'''Return value'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AllOff'''
 
+
|-
:''This call does not return a value''
+
| colspan="2" | Switches Off All LEDs.&nbsp;
 
+
|-
 
+
|-
===<span style="font-weight: normal;"><u><tt>LEDOff</tt></u></span>===
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Turns off the selected LED leaving the other LEDs as was.
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Index''
 
::LED to switch off. Range: 0-7
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>PointGraph</tt></u></span>===
 
Turns on the Indexed LED and turns all others off.
 
 
 
Does nothing if the index is out of range.
 
 
 
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Index''
 
::The LED to light. Range: 0-7
 
  
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>WriteValue</tt></u></span>===
 
Write a number which is presented on the LEDs in binary.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Value''
 
::Value to write to the LEDs. Range: 0-255
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>AllOff</tt></u></span>===
 
Switches Off All LEDs.
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Output Mode</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''OutputMode''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Port</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Output Mode
This property is of type ''Digital port byte'' and can be referenced with the variable name ''Port''.
+
|-
 
+
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Colour
 +
|-
 +
| colspan="2" | &nbsp;
 +
|}

Revision as of 14:40, 16 January 2023

Author Matrix TSL
Version 1.0
Category E-blocks 2


LED component

LED component to drive the E-blocks 2 BL0167 LED board. Provides eight individually addressable LEDs.

Component Source Code

Please click here for the component source code: FC_Comp_Source_EBlocks2_LED_BL0167.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png BarGraph
Turns on the first N elements of the array - for generating bar graph metes etc. 
Fc9-u8-icon.png - BYTE Length
How many items to light up. Range 0-8 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LEDOn
Turns on the selected LED leaving the other LEDs as was. 
Fc9-u8-icon.png - BYTE Index
LED to switch on. Range: 0-7 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png AllOn
Switches On All LEDs. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LEDOff
Turns off the selected LED leaving the other LEDs as was. 
Fc9-u8-icon.png - BYTE Index
LED to switch off. Range: 0-7 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png PointGraph
Turns on the Indexed LED and turns all others off. Does nothing if the index is out of range. 
Fc9-u8-icon.png - BYTE Index
The LED to light. Range: 0-7 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteValue
Write a number which is presented on the LEDs in binary. 
Fc9-u8-icon.png - BYTE Value
Value to write to the LEDs. Range: 0-255 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png AllOff
Switches Off All LEDs. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Output Mode
 
Fc9-type-19-icon.png Port
 
Fc9-type-16-icon.png Colour