The final sensor you'll learn about in this chapter is the altimeter/pressure sensor. The altimeter is useful when you want to know the altitude of your project. This is particularly useful when you want to build a robot that can fly. For more on pressure sensors and how they work, see http://www.sensorsmag.com/sensors/pressure/fundamentals-pressure-sensor-technology-846. First, you'll need to select a device. One device that can provide this information is the SainSmart BMP085 Module, Digital Barometric Pressure Sensor, available at many online retailers, including www.amazon.com. This device uses piezo-resistive technology to measure altitude. The following image shows this:
It looks very similar to the digital compass; just like the two previous devices, it connects via the I2C interface. You can even use the same libraries you just downloaded for the accelerometer/gyro for I2C support.