Actually run the reader
This commit is contained in:
parent
8c4c31b686
commit
a40c24f050
|
@ -6,11 +6,16 @@ The value is then send as a notification.
|
|||
from subprocess import run
|
||||
|
||||
|
||||
def __main__():
|
||||
def main():
|
||||
"""
|
||||
This function is called when the script is executed.
|
||||
"""
|
||||
# Read the counter_reader value from the device.
|
||||
counter_value = run(["cat", "/dev/inex_counter"], capture_output=True).stdout.decode("utf-8")
|
||||
print(counter_value)
|
||||
# Send the counter_reader value as a notification.
|
||||
run(["notify-send", "Counter value", counter_value])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue