We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ce7476 commit 457b4d0Copy full SHA for 457b4d0
Adafruit_BMP085/Adafruit_BMP085_example.py
@@ -17,9 +17,19 @@
17
# bmp = BMP085(0x77, 3) # ULTRAHIRES Mode
18
19
temp = bmp.readTemperature()
20
+
21
+# Read the current barometric pressure level
22
pressure = 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
26
altitude = bmp.readAltitude()
27
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
33
print "Temperature: %.2f C" % temp
34
print "Pressure: %.2f hPa" % (pressure / 100.0)
35
print "Altitude: %.2f" % altitude
0 commit comments