led - bruno-beloff/scs_dev GitHub Wiki

docs > software repositories > scs_dev > commands > device control


DESCRIPTION

The led utility is used to control a two-colour (red / green) LED mounted on the South Coast Science free-to-air SHT board.

On some Praxis device configurations, a free-to-air temperature and humidity board is mounted in the air intake of the optical particle counter (OPC). Since the board is visible from outside the unit, it is useful to mount indicator LEDs in this position.

LED options are as follows:

  • R - Red
  • A - Amber
  • G - Green
  • 0 - Off

In practice, the led utility does a very simple job: it validates its parameters, then presents these on stdout or the named Unix domain socket in a format that is compatible with the led_controller utility.

If the Unix domain socket has no listener, the led utility discards messages.

SYNOPSIS

led.py { -s { R | A | G | 0 } | -f { R | A | G | 0 } { R | A | G | 0 } } [-u UDS] [-v]

Options
--version show program's version number and exit
-h, --help show this help message and exit
-s SOLID, --solid=SOLID continuous colour
-f FLASH, --flash=FLASH flashing colours
-u UDS, --uds=UDS send to Unix domain socket instead of stdout
-v, --verbose report narrative to stderr

EXAMPLES

./led.py -v -f R 0 -u /home/scs/SCS/pipes/scs_led_control.uds

DOCUMENT EXAMPLE

{"colour0": "R", "colour1": "G"}

SEE ALSO

scs_dev/interface_power
scs_dev/led_controller

RESOURCES

Praxis LED colours