From 1c8be946d7c1ddc866fad3acbe75dcf1eb2acf57 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 20 Feb 2021 16:46:41 +0100 Subject: [PATCH] collect Sharp's GP2Y1010AU0F --- dust.sh | 4 ++++ system/dust.service | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100755 dust.sh create mode 100644 system/dust.service diff --git a/dust.sh b/dust.sh new file mode 100755 index 0000000..47c9b28 --- /dev/null +++ b/dust.sh @@ -0,0 +1,4 @@ +#!/bin/sh -xe + +cd /nuc/air-quality/ +MEASUREMENT=dust ./dsm501.pl /dev/ttyACM0 diff --git a/system/dust.service b/system/dust.service new file mode 100644 index 0000000..2744a77 --- /dev/null +++ b/system/dust.service @@ -0,0 +1,11 @@ +[Unit] +Description=dust sensor + +[Service] +User=dpavlin +ExecStart=/nuc/air-quality/dust.sh +Restart=always +RestartSec=2s + +[Install] +WantedBy=multi-user.target -- 2.20.1