Jump to content

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

From Flowcode Help
XML import - Pre 8.0 release
 
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(19 intermediate revisions by 3 users not shown)
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)
| 7.7
|-
|-
| 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==
==Version information==
LED component to drive the E-blocks 2 BL0167 LED board.
Provides eight individually addressable LEDs.


==Examples==
Library Version, Component Version, Date, Author, Info
''<span style="color:red;">No additional examples</span>''
7, 7.0, 23-04-25, MW, Modified component icon to look better in dark mode
7, 7.0, 23-04-25, MW, Hidden propert to change LED colours as the LEDS on the BL0167 are red
  8, 7.0, 08-05-25, BR, Added autodetect port on Ev_PostInitialise




==Downloadable macro reference==
==Detailed description==


===<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'''


:[[Variable Types|BYTE]] ''Length''
::How many items to light up. Range 0-8




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>LEDOn</tt></u></span>===
Turns on the selected LED leaving the other LEDs as was.


'''Parameters'''


:[[Variable Types|BYTE]] ''Index''
::LED to switch on. Range: 0-7


''No detailed description exists yet for this component''


'''Return value'''
==Examples==


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>AllOn</tt></u></span>===
Switches On All LEDs.


'''Parameters'''


:''This macro has no parameters''




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>LEDOff</tt></u></span>===
Turns off the selected LED leaving the other LEDs as was.


'''Parameters'''


:[[Variable Types|BYTE]] ''Index''
''<span style="color:red;">No additional examples</span>''
::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''


==Macro reference==


===<span style="font-weight: normal;"><u><tt>WriteValue</tt></u></span>===
===AllOff===
Write a number which is presented on the LEDs in binary.
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''AllOff'''
|-
| colspan="2" | Switches Off 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''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Value''
===AllOn===
::Value to write to the LEDs. Range: 0-255
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}




'''Return value'''
===BarGraph===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''


===LEDOff===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


===<span style="font-weight: normal;"><u><tt>AllOff</tt></u></span>===
Switches Off All LEDs.


'''Parameters'''
===LEDOn===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


:''This macro has no parameters''


 
===PointGraph===
'''Return value'''
{| class="mtx-class-macrotable wikitable"
 
|-
:''This call does not return a value''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}




 
===WriteValue===
==Simulation macro reference==
{| class="mtx-class-macrotable wikitable"
 
|-
''This component does not contain any simulation macros''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}




==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''.
''<span style="color:red;">No additional information</span>''


{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" class="mtx-class-macrohead" | '''Properties'''
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Output Mode
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
| width="90%" | Port
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Colour
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Colour
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Shape
|-
| colspan="2" | &nbsp;
|}


<span style="font-weight: normal;"><u>Port</u></span>
==Component Source Code==


This property is of type ''Digital port byte'' and can be referenced with the variable name ''Port''.
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EB_LED_BL0167.fcfx FC_Comp_Source_EB_LED_BL0167.fcfx]


''<span style="color:red;">No additional information</span>''
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EB_LED_BL0167.fcfx FC_Comp_Source_EB_LED_BL0167.fcfx]

Latest revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 7.7
Category E-blocks 2


LED component

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

Version information

Library Version, Component Version, Date, Author, Info
7, 7.0, 23-04-25, MW, Modified component icon to look better in dark mode
7, 7.0, 23-04-25, MW, Hidden propert to change LED colours as the LEDS on the BL0167 are red
 8, 7.0, 08-05-25, BR, Added autodetect port on Ev_PostInitialise


Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

AllOff

AllOff
Switches Off All LEDs. 
- VOID Return


AllOn

AllOn
Switches On All LEDs. 
- VOID Return


BarGraph

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


LEDOff

LEDOff
Turns off the selected LED leaving the other LEDs as was. 
- BYTE Index
LED to switch off. Range: 0-7 
- VOID Return


LEDOn

LEDOn
Turns on the selected LED leaving the other LEDs as was. 
- BYTE Index
LED to switch on. Range: 0-7 
- VOID Return


PointGraph

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


WriteValue

WriteValue
Write a number which is presented on the LEDs in binary. 
- BYTE Value
Value to write to the LEDs. Range: 0-255 
- VOID Return


Property reference

Properties
Output Mode
 
Port
 
Colour
Colour
 
Shape
 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_EB_LED_BL0167.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_EB_LED_BL0167.fcfx