File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1717# bmp = BMP085(0x77, 3) # ULTRAHIRES Mode
1818
1919temp = bmp .readTemperature ()
20+
21+ # Read the current barometric pressure level
2022pressure = bmp .readPressure ()
23+
24+ # To calculate altitude based on an estimated mean sea level pressure
25+ # (1013.25 hPa) call the function as follows, but this won't be very accurate
2126altitude = bmp .readAltitude ()
2227
28+ # To specify a more accurate altitude, enter the correct mean sea level
29+ # pressure level. For example, if the current pressure level is 1023.50 hPa
30+ # enter 102350 since we include two decimal places in the integer value
31+ # altitude = bmp.readAltitude(102350)
32+
2333print "Temperature: %.2f C" % temp
2434print "Pressure: %.2f hPa" % (pressure / 100.0 )
2535print "Altitude: %.2f" % altitude
You can’t perform that action at this time.
0 commit comments