1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Update in: 29 December 2020


:

# measure the temperature using a Raspberry Pi with Raspbian installed
# Cor van Wandelen 18-12-2020
# uses a DS18B20 temperature sensor soldered to pin 1 (VCC 3.3 V), pin 6 (GND) and pin 7 (GPIO)
# a 6.8k resistor is soldered between pin 1 and 7
# /boot/config.txt: dtoverlay=w1-gpio
# /etc/modules:
# w1-gpio
# w1-therm

module_begin
module_name Temperature
module_type generic_data
module_exec cat /sys/bus/w1/devices/28-*/w1_slave | sed -n 's/^.*(t=[^ ]*).*/1/p' | sed 's/t=//' | awk '{x=$1}END{print(x/1000)}'
module_description Temperature sensor
module_group System
module_max_warning 20
module_min_critical 20
module_min_warning 0
module_max_critical 28
module_end
(Visited 103 times, 1 visits today)