Jump to content

Component: LED Array (LEDs): Difference between revisions

From Flowcode Help
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder""
Line 213: Line 213:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 232: Line 232:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-
Line 266: Line 266:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Appearance
| width="90%" class="mtx-class-propfolder" | Appearance
|-
|-
|-
|-

Revision as of 14:35, 13 July 2026

Author Matrix TSL
Version 1.0
Category LEDs


LED Array component

An array of LED indicators equally spaced and complete with labels to indicate their meaning. Embedded can be used to control an 8-bit port or up to 8 individual pins.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Example program which uses the point graph macro and loops to create a knight rider effect using the LED array.

LED KnightRider


Example program which reads an analogue value from an analogue input voltage and displays the reading in Binary on the LED array.

LED Count


LEDs can be wired either active high or active low. The LED Array components have a property allowing you to configure which LED type your using.


An active high LED will light when the microcontroller pin is outputting a logic 1 and be off when the microcontroller pin is outputting a logic 0 or in input mode.


An active low LED will light when the microcontroller pin is outputting a logic 0 and be off when the microcontroller pin is outputting a logic 1 or in input mode.


The series resistor can be on either side of the LED and acts to protect the LED from damage due to excess current. The value of resistor used can be changed based on the brightness of the LED and power consumption.


This LED Calculator tool is a good resource for calculating the correct LED series protection resistor.

LED Resistor Calculator Tool

Macro reference

AllOff

AllOff
Turns off all elements 
- VOID Return


AllOn

AllOn
Turns on all elements 
- 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. 
- VOID Return


LEDOff

LEDOff
Turn off the selected led. 
- BYTE Index
Index of the LED to turn on. 
- VOID Return


LEDOn

LEDOn
Turn on the selected LED. 
- BYTE Index
Index of the LED to turn on. 
- 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 show. 
- VOID Return


WriteValue

WriteValue
Write a number which is presented on the LEDs in binary. 
- BYTE Value
Provide a value to be written to the LEDs in binary 
- VOID Return


Property reference

Properties
Count
The number of LEDs in the array from 1 to 8. 
Connections
Output Mode
 
Port
 
Polarity
 
Simulation
Switch layout
 
Distance between LEDs
 
Label colour
 
Component Label
 
Show Connection Label
If enabled, the pin designation will be shown, e.g. B0. 
Show Pin Value
Pin status of VCC or GND will be shown when enabled and simualtion is running. 
Appearance
Shape
 
Colour
 
Style