Modifications

Sauter à la navigation Sauter à la recherche
1 134 octets ajoutés ,  18 avril 2013 à 11:20
Ligne 68 : Ligne 68 :     
Run the sketch to see the calculated altitude.
 
Run the sketch to see the calculated altitude.
 +
 +
[[Fichier:BMP085-Utiliser-02.jpg]]
 +
 +
For example, according to the sensor we are 21.5m below sea level. Only problem is, I know for a fact that our current location is not below sea level! So what's wrong with the sensor? Turns out the sensor is just fine. The problem is that the pressure at sea level changes with the weather. So we need to 'normalize' the sensor, and let it know what the sea-level pressure is. You can look up the current sea level pressure on any weather site.
 +
 +
[[Fichier:BMP085-Utiliser-03.jpg]]
 +
 +
Unfortunately there are half-dozen different units of pressure. here we see it in inches, that's technically "Mercury Inches" or "Hg Inches We need it in Pascals, so [ http://www.engineeringtoolbox.com/pressure-units-converter-d_569.html we'll convert it]!
 +
 +
[[Fichier:BMP085-Utiliser-04.jpg]]
 +
 +
OK so that's 101,964 Pascals. Open up the '''Examples->BMP085test''' example from the Arduino IDE menubar and edit the line where you pass in the 'corrected' altitude.
 +
 +
[[Fichier:BMP085-Utiliser-05.jpg]]
 +
 +
Now it will print out the correct altitude! 30 meters which is a lot better.
 +
 +
[[Fichier:BMP085-Utiliser-06.jpg]]
    
{{BMP085-TRAILER}}
 
{{BMP085-TRAILER}}
29 918

modifications

Menu de navigation