Benutzer-Werkzeuge

Webseiten-Werkzeuge


projects:1-wire:software

Dies ist eine alte Version des Dokuments!


1-Wire Software

DigiTemp v3.5.0 by Brian C. Lane
Download

  1. download sources
    wget http://www.digitemp.com/software/linux/digitemp-3.6.0.tar.gz
  2. untar archive
    tar xzvf digitemp-3.6.0.tar.gz
  3. change directory
    cd digitemp-3.6.0/
  4. compile source
    make ds9097
  5. copy binary
    cp ./digitemp_DS9097 /usr/local/bin/
  6. create softlink
    ln -s /usr/local/bin/digitemp_DS9097 /usr/local/bin/digitemp
  7. search for 1-wire sensors (walk the tree)
    digitemp -w -s /dev/ttyS0

    sample output:

        DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
        GNU Public License v2.0 - http://www.digitemp.com
        Turning off all DS2409 Couplers
        ..
        Devices on the Main LAN
        10444341020800A3 : DS1820/DS18S20/DS1920 Temperature Sensor
        28F4E539040000FD : DS18B20 Temperature Sensor
  8. write config file to .digitemprc
    digitemp -q -i -s /dev/ttyS0

    sample output:

        10444341020800A3 : DS1820/DS18S20/DS1920 Temperature Sensor
        28F4E539040000FD : DS18B20 Temperature Sensor
        ROM #0 : 10444341020800A3
        ROM #1 : 28F4E539040000FD
  9. edit config file
    vi .digitemprc
    .digitemprc
        TTY /dev/ttyS0
        READ_TIME 1000
        FAIL_TIME 5
        LOG_TYPE 1
        #LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
        LOG_FORMAT "%Y-%m-%d %H:%M:%S Sensor_%s (%R) %.2C"
        CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
        HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
  10. request temperature from sensors
    digitemp -q -a

    sample output:

        2012-12-07 00:48:51 Sensor_0 (10444341020800A3) 20.31
        2012-12-07 00:48:52 Sensor_1 (28F4E539040000FD) 20.94
projects/1-wire/software.1354837837.txt.gz · Zuletzt geändert: (Externe Bearbeitung)