0
zeekoe

tutorial Tinker board - DS1621 temperature sensor

Recommended Posts

For those who like to monitor temperature. Connect SDA & SCL to pins 3 and 5, connect 3.3V and GND. Connect all address wires of the DS1621 to ground.

# sudo apt install i2c-tools
# echo ds1621 0x48 >/sys/class/i2c-adapter/i2c-1/new_device# cat /sys/devices/platform/ff140000.i2c/i2c-1/1-0048/hwmon/hwmon0/temp1_input

Optional, use lm-sensors:

# sudo apt install lm-sensors
# sensors

Optional, temperature logging:

Create a file logtemp.sh with the following contents:

#!/bin/bash
echo "`date +%Y-%m-%dT%R`;`cat /sys/devices/platform/ff140000.i2c/i2c-1/1-0048/hwmon/hwmon0/temp1_input`" >>/home/USER/temp

 

Add an entry to /etc/crontab:

0  *    * * *   USER /home/USER/logtemp.sh

And restart cron or your box for logging every hour.

 

Thanks to https://www.electronicsfaq.com/2013/08/ds1621-with-raspberry-piarchlinuxarm.html

Hope it's useful for someone!

Share this post


Link to post
Share on other sites
0