2 # Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de
\r
3 # All rights reserved.
\r
5 # Redistribution and use in source and binary forms, with or without
\r
6 # modification, are permitted provided that the following conditions are
\r
9 # * Redistributions of source code must retain the above copyright
\r
10 # notice, this list of conditions and the following disclaimer.
\r
11 # * Redistributions in binary form must reproduce the above copyright
\r
12 # notice, this list of conditions and the following disclaimer in the
\r
13 # documentation and/or other materials provided with the
\r
15 # * All advertising materials mentioning features or use of this
\r
16 # software must display the following acknowledgement: This product
\r
17 # includes software developed by tm3d.de and its contributors.
\r
18 # * Neither the name of tm3d.de nor the names of its contributors may
\r
19 # be used to endorse or promote products derived from this software
\r
20 # without specific prior written permission.
\r
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
\r
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
\r
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
\r
25 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
\r
26 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
\r
27 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\r
28 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
\r
29 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
\r
30 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
34 execfile("owlib.py")
\r
39 print "No 1-Wire Device found"
\r
43 # print("%i) %s" %(i,s))
\r
45 #n=int(raw_input("No. of Device: "))
\r
47 #if (n>dc-1)or(n<0):
\r
54 elif (s[0:2]=="20"):
\r
56 elif (s[0:2]=="26"):
\r
58 elif (s[0:2]=="1d"):
\r
68 print dev.getChips()
\r
69 print dev.getProperties()
\r
70 print dev.getUnits()
\r
75 print dev.owid,dev.values
\r
81 #P0=Press/((1-h/44330)**5.255)
\r