File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ def readCalibrationData(self):
114
114
self ._mpl115a2_b1 /= 8192.0
115
115
self ._mpl115a2_b2 /= 16384.0
116
116
self ._mpl115a2_c12 /= 4194304.0
117
- self ._mpl115a2_c12 /= 10 ** 9
117
+ # self._mpl115a2_c12 /= 10**9
118
118
119
119
if (self .debug ):
120
120
self .showCalibrationData ()
@@ -149,7 +149,7 @@ def getPT(self):
149
149
pressureComp = self ._mpl115a2_a0 + (self ._mpl115a2_b1 + self ._mpl115a2_c12 * temp ) * pressure + self ._mpl115a2_b2 * temp
150
150
P = ((65.0 / 1023 ) * pressureComp ) + 50.0
151
151
T = ((temp - 498.0 ) / - 5.35 + 25.0 )
152
- return P ,T
152
+ return P ,T , temp
153
153
154
154
155
155
def readRawPressure (self ):
Original file line number Diff line number Diff line change 16
16
# bmp = BMP085(0x77, 2) # HIRES Mode
17
17
# bmp = BMP085(0x77, 3) # ULTRAHIRES Mode
18
18
19
- temp , pressure = mpl .getPT ()
19
+ temp , pressure , temp2 = mpl .getPT ()
20
20
21
21
# temp = mpl.readTemperature()
22
22
# pressure = mpl.readPressure()
23
23
# altitude = mpl.readAltitude()
24
24
25
25
print "Temperature: %.2f C" % temp
26
26
print "Temperature: %.2f F" % (temp * 9 / 5 + 32 )
27
+ print "Temperature: %.2f C" % temp2
28
+ print "Temperature: %.2f F" % (temp2 * 9 / 5 + 32 )
27
29
print "Pressure: %.2f hPa" % (pressure / 100.0 )
28
30
#print "Altitude: %.2f" % altitude
You can’t perform that action at this time.
0 commit comments