Yes, I'd already done that, I was trying to work out what extra the
> other things would give me.
>
> --
>
If you look in the /mnt/1-wire/ directory you will see various other
directories.
I have a DS1921 ibutton which is a thermochron.
The data it holds will be in a directory beginning 21xxxxxxxxxxxxxxxxxxxx
( mine is 21.B5FB22000000 and each has it's own unique number )
Within that directory are various others. The one labeled temperature give
the current value
if the unit is not on a 'mission' i.e taking a series of readings.
You can also display the result of a whole series of readings it has taken
during a 'mission'
The python code below will do this.
( substitute the identifier for your ibutton in this example )
#!/usr/bin/python
import os
basedir = "/mnt/1-wire" # or where you have told owfs to mount your ibutton
m = 0
counter = 2047
while m <= counter:
mytime = basedir + '/1-wire/21B5FB22000000/log/date.' + str(m)
myval = basedir + '/1-wire/21B5FB22000000/log/temperature.' + str(m)
fptemp = open(myval, 'r')
ptemp = fptemp.readline()
fptime = open(mytime, 'r')
ptime = fptime.readline()
mx = ptime + " - " + ptemp + " " + str(m)
print (mx)
fptemp.close()
fptime.close()
m += 1
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers