From 58117c8ff9148ef0d23397da950e78b28a461921 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sat, 29 Dec 2018 18:09:07 +0100 Subject: [PATCH] support for one-wire termal sensor --- Makefile | 7 ++++--- files/boot/config.txt | 1 + files/etc/rc.local | 3 +++ gummikraken.mk | 6 ++++-- sensors/hatch.sh | 17 +++++++++++++++++ sensors/sensor_temp.sh | 5 +++++ teesock.mk | 2 ++ 7 files changed, 36 insertions(+), 5 deletions(-) create mode 100755 sensors/hatch.sh create mode 100755 sensors/sensor_temp.sh diff --git a/Makefile b/Makefile index 5616e00..b24b42b 100644 --- a/Makefile +++ b/Makefile @@ -74,10 +74,11 @@ files/root/.ssh/authorized_keys: id_rsa.pub chmod 700 files/root/ files/root/.ssh/ chmod 600 '$@' -include gummikraken.mk -include teesock.mk +# include gummikraken.mk +# include teesock.mk +include *.mk -raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi files/srv/gummikraken/ files/usr/local/bin/teesock +raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi -rmdir "$@.mnt" mkdir "$@.mnt" # fail receipe if dir is nonempty dd bs=1M count=0 seek=1792 of="$@" # set up sparse file diff --git a/files/boot/config.txt b/files/boot/config.txt index 288a466..53d5a7b 100644 --- a/files/boot/config.txt +++ b/files/boot/config.txt @@ -4,3 +4,4 @@ # see config.example for the Oktopus build config dtparam=audio=on +dtoverlay=w1-gpio diff --git a/files/etc/rc.local b/files/etc/rc.local index 0d93731..05ff1c3 100755 --- a/files/etc/rc.local +++ b/files/etc/rc.local @@ -1,5 +1,8 @@ #!/bin/sh +modprobe w1-gpio pullup=1 +modprobe w1-therm + bt-network -s nap br0 & hciconfig hci0 up hciconfig hci0 sspmode 1 diff --git a/gummikraken.mk b/gummikraken.mk index 812a3b4..18651b1 100644 --- a/gummikraken.mk +++ b/gummikraken.mk @@ -1,5 +1,7 @@ -files/srv/gummikraken/: gummikraken/ +files/srv/gummikraken/: gummikraken/ sensors/ .FORCE mkdir -p "$@" - cp -av "$