MY9221 Class
Item Index
Methods
MY9221
-
dataPin
-
clockPin
-
instances
Instantiates an MY9221 object
Parameters:
-
dataPin
NumberData pin
-
clockPin
NumberClock pin
-
instances
NumberNumber of daisy-chained my9221s, default 1
Returns:
setAutoRefresh
-
enable
Enable or disable auto refresh. When auto refresh is enabled, update the LED display as soon as the internal state changes. When false, the display(s) will not be updated until the refresh() method is called.
Parameters:
-
enable
Booleantrue to enable auto refresh, false otherwise
setLED
-
led
-
on
Set an LED to a specific on (high intensity) or off (low intensity) value.
Parameters:
-
led
NumberThe LED whose state you wish to change
-
on
Booleantrue to turn on the LED, false to turn the LED off
setLowIntensityValue
-
intensity
Set the greyscale intensity of an LED in the OFF state. The intensity is a value from 0 (fully off) to 255 (fully on). This will take effect on any future LED set or clear operations.
Parameters:
-
intensity
Numbera value from 0 (fully off) to 255 (fully on)
setHighIntensityValue
-
intensity
Set the greyscale intensity of an LED in the ON state. The intensity is a value from 0 (fully off) to 255 (fully on). This will take effect on any future LED set or clear operations.
Parameters:
-
intensity
Numbera value from 0 (fully off) to 255 (fully on)
setAll
()
Set all of the LEDS to the ON (high intensity value) state.
clearAll
()
Set all of the LEDS to the OFF (low intensity value) state.
refresh
()
Set the LED states to match the internal stored states. This is useful when auto refresh ( setAutoRefresh() ) is false to update the display.