root@letux:~/pyra_vol_mon# ./pyra_vol_mon --channel 1 --step 10 --help
Usage: pyra_vol_mon [OPTION]... EXECUTABLE
Monitor palmas_gpadc ADC channel and run EXECUTABLE when input changes.
-c, --channel ADC channel to monitor. The Pyra volume wheel is
connected to ADC channel 2.
Defaults to 2.
-l, --min Lower limit to monitor. ADC values below this limit will
only trigger executable once, until the ADC channel goes
above the limit again.
Defaults to 0.
-u, --max Upper limit to monitor. ADC values above this limit will
only trigger executable once, until the ADC cannel goes
below the limit again.
Defaults to 0x7FF.
-s, --step How much the ADC input value is allowed to change before
calling the executable again.
Defaults to 25.
-h, --help Show this help text and exit
-v, --verbose Be a bit more verbose.
EXECUTABLE will be called like this:
EXECUTABLE <adc value>