Component: LED Bar v2.0 (Grove 104020006) (104020006) (LEDs)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category LEDs


LED Bar v2.0 (Grove 104020006) component

LED Bar is comprised of a 10 segment LED gauge bar and an MY9221 LED controlling chip. It can be used as a indicator for remaining battery life, voltage, water level, music volume or other values that require a gradient display. There are 10 LED bars in the LED bar graph: one red, one yellow, one light green, and the rest green. It lights up the LEDs sequentially from red to green, so the entire bar graph is lit up in the end.

Component Pack

SENSORS

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png SetBinary
Allows a binary value to be shown on the LEDs. Red = Bit0 Yellow = Bit1 Light Green = Bit2 Green = Bit3 - Bit9 
Fc9-u16-icon.png - UINT Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LatchDataSim
Latches the data and shifts the new input to the output. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetLevelReverse
Set level 0-10 in reverse, green to red, where 10 is red Level 0 means all leds off while level 5 means leds 1-5 on and 6-10 will be off 
Fc9-u8-icon.png - BYTE Level
Range: 0-10 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetLevel
Set level 0-10, red to green, where 1 is red Level 0 means all leds off while level 5 means leds 1-5 on and 6-10 will be off 
Fc9-u8-icon.png - BYTE Level
Range: 0-10 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetSingleLED
Allows a single LED to be controlled and switched on or off. LED 0 = Red LED 1 = Yellow LED 2 = Light Green LED 3-9 = Green 
Fc9-u8-icon.png - BYTE LED
Range: 0-9 
Fc9-u8-icon.png - BYTE State
0=Off / 1=On 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-5-icon.png Data
Data pin  
Fc9-type-5-icon.png Clock
Clock pin  
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations