Applications Develop Python applications
IX10 User Guide
641
LED Attribute name Color
LTE connection indicator Led.COM Red
Led.ETH Green
Led.ONLINE Blue
Signal strength indicators 1 Led.RSS1 Green
2 Led.RSS2
3 Led.RSS3
4 Led.RSS4
5 Led.RSS5
Available LED states
State Attribute name
Solid on State.ON
Off State.OFF
Flash State.FLASH
Use Python to set the state of LEDs
The following example uses an interactive Python session to set the state of all LEDs to flashing:
1. At the shell prompt, use the python command with no parameters to enter an interactive
Python session:
# python
Python 3.10.1 (main, Mar 30 2023, 23:47:13) [GCC 11.2.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)
5. Use led.set() to set the state of the LEDs:
>>> led.set(Led.ALL, State.FLASH)