Applications Use Python to control the color of multi-colored LEDs
IX30 User Guide
664
LED attribute name Color State
Led.COM Purple
ON
Led.ETH
OFF
Led.ONLINE
ON
Led.COM Purple flashing
FLASH
Led.ETH
OFF
Led.ONLINE
FLASH
Led.COM
Cyan OFF
Led.ETH
ON
Led.ONLINE
ON
Led.COM Cyan flashing
OFF
Led.ETH
FLASH
Led.ONLINE
FLASH
See The digidevice led submodule for a definition of the IX30's LEDs, including RGB leds, and the
names of the attributes for each LED that will be used by the digidevice.led module.
Example: Set the LTE connection indicator to flashing purple
1. At the shell prompt, use the python command with no parameters to enter an interactive
Python session:
# python
Python 3.10.1 (default, May 9 2021, 22:49:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
2. Import the led submodule:
>>> from digidevice import led
3. Import the Led and State objects from the led submodule:
>>> from digidevice.led import Led, State
4. Use led.acquire() to gain control of the all LEDs:
>>> led.acquire(Led.ALL)