Connecting an altimeter/pressure sensor to Arduino

The final sensor that you'll learn about in this chapter is the altimeter/pressure sensor. An altimeter measures the barometric pressure, and as this pressure decreases with rising elevation, it can indicate elevation. This is particularly useful when you want to build a robot that can fly. 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. It looks as follows:

Connecting an altimeter/pressure sensor to Arduino

It looks very similar to the digital compass, and just like the earlier two devices, it connects via the I2C interface. You can even use the same libraries you just downloaded for the accelerometer/gyro for I2C support.

The connections between Arduino and the device will be the same as the digital compass, as demonstrated in the following table:

Arduino pin

Sensor pin

5V

5V

GND

GND

A5

SCL

A4

SDA

The connections, just like those of the digital compass, are clearly marked on the back of the device, and you can use female-to-male jumpers to make the connections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.218.221