First, let's talk about the BMP180 from ICStation. You will need to solder the included header to the board. There are 5 pins, of which only 4 are needed. there is a VCC pin for 5v operation, or a 3.3 pin for 3.3v operation. GND connects to Arduino GND, SCL connects to Arduino SCL (A5), and SDA which connects to Arduino SDA (A4).
Use checkout code "steveics", and get a 15% discount on the sensors!
Code: steveics Discount Amount: 15% Max Use: 1 No Min Order Started Date: 16th Mar, 2015 Ended Date: 16th May, 2015
You will need to download and import two libraries (using the Arduino Sketch, Import Library, Add Library menu sequence). Those libraries are:
Adafruit BMP085 Unified
The code for a BMP085 and a BMP180 is identical. The BMP180 is a smaller, cheaper version of the older BMP085.
There is a example sketch on the File, Examples, Adafruit BMP085 menu called sensorapi. Load that into your IDE.
Because we are using the Arduino Micro, there is a small change that we have to make. This concerns the Leonardo as well. These units use the ATmega32u4 which not only is the processor, but is also the USB interface. As such, a reset not only resets the processor, but also resets the USB connection. We have to add a small delay after Serial.begin, or nothing in the Setup() will get printed to the serial monitor.
while (!Serial) ; //needed for leonardo and micro
So, now that we have connected, and opened the example sketch, make sure you have chosen the correct board and port on the tools menu, go ahead and upload the sketch. When it says done uploading, open your Serial Monitor, and you should see something like the following:
Notice all the values are in metric (SI). I prefer US Customary (Standard) units myself, so I will probably add some conversion code to the units.