This commit is contained in:
Minecon724 2024-07-15 12:51:45 +02:00
parent d84b7a20a5
commit 04a73ae1a2
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
3 changed files with 23 additions and 1 deletions

View file

@ -11,7 +11,8 @@ Ambient temperature is read from `/sys/bus/w1/devices` so you must have 1wire en
# compilation and usage
`make` or `gcc main.c -o measurer` \
Should throw no warnings \
`./measurer <output>`
`./measurer <output>` \
You can schedule this with [systemd](/src/branch/master/systemd)
# why
like heavy ahh like databases grafana etc go away you're a performance monitor why'd you reduce performance

11
systemd/measurer.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=measurer
[Service]
User=pi
Group=pi
WorkingDirectory=/home/pi/measurer
ExecStart=/home/pi/measurer/measurer /home/pi/measurer/data.csv
[Install]
WantedBy=multi-user.target

10
systemd/measurer.timer Normal file
View file

@ -0,0 +1,10 @@
[Unit]
Description=Say Hello every 10 seconds
[Timer]
OnBootSec=10
OnUnitActiveSec=10
AccuracySec=1
[Install]
WantedBy=timers.target