BMP180 disconnecting?

I'm trying to run the BMP180 altimeter off of a Arduino and I am having trouble with the code.

/* SFE_BMP180 altitude example sketch

This sketch shows how to use the Bosch BMP180 pressure sensor
as an altimiter.
https://www.sparkfun.com/products/11824

Like most pressure sensors, the BMP180 measures absolute pressure.
Since absolute pressure varies with altitude, you can use the pressure
to determine your altitude.

Because pressure also varies with weather, you must first take a pressure
reading at a known baseline altitude. Then you can measure variations
from that pressure

Hardware connections:

- (GND) to GND
+ (VDD) to 3.3V

(WARNING: do not connect + to 5V or the sensor will be damaged!)

You will also need to connect the I2C pins (SCL and SDA) to your
Arduino. The pins are different on different Arduinos:

Any Arduino pins labeled:  SDA  SCL
Uno, Redboard, Pro:        A4   A5
Mega2560, Due:             20   21
Leonardo:                   2    3

Leave the IO (VDDIO) pin unconnected. This pin is for connecting
the BMP180 to systems with lower logic levels such as 1.8V

Have fun! -Your friends at SparkFun.

The SFE_BMP180 library uses floating-point equations developed by the
Weather Station Data Logger project: http://wmrx00.sourceforge.net/

Our example code uses the "beerware" license. You can do anything
you like with this code. No really, anything. If you find it useful,
buy me a beer someday.

V10 Mike Grusin, SparkFun Electronics 10/24/2013
V1.1.2 Updates for Arduino 1.6.4 5/2015
*/

// Your sketch must #include this library, and the Wire library.
// (Wire is a standard library included with Arduino.):

#include <SFE_BMP180.h>
#include <Wire.h>

// You will need to create an SFE_BMP180 object, here called "pressure":

SFE_BMP180 pressure;

double baseline; // baseline pressure

void setup()
{
  Serial.begin(9600);
  Serial.println("REBOOT");

  // Initialize the sensor (it is important to get calibration values stored on the device).

  if (pressure.begin())
    Serial.println("BMP180 init success");
  else
  {
    // Oops, something went wrong, this is usually a connection problem,
    // see the comments at the top of this sketch for the proper connections.

    Serial.println("BMP180 init fail (disconnected?)\n\n");
    while(1); // Pause forever.
  }

  // Get the baseline pressure:
  
  baseline = getPressure();
  
  Serial.print("baseline pressure: ");
  Serial.print(baseline);
  Serial.println(" mb");  
}

void loop()
{
  double a,P;
  
  // Get a new pressure reading:

  P = getPressure();

  // Show the relative altitude difference between
  // the new reading and the baseline reading:

  a = pressure.altitude(P,baseline);
  
  Serial.print("relative altitude: ");
  if (a >= 0.0) Serial.print(" "); // add a space for positive numbers
  Serial.print(a,1);
  Serial.print(" meters, ");
  if (a >= 0.0) Serial.print(" "); // add a space for positive numbers
  Serial.print(a*3.28084,0);
  Serial.println(" feet");
  
  delay(500);
}


double getPressure()
{
  char status;
  double T,P,p0,a;

  // You must first get a temperature measurement to perform a pressure reading.
  
  // Start a temperature measurement:
  // If request is successful, the number of ms to wait is returned.
  // If request is unsuccessful, 0 is returned.

  status = pressure.startTemperature();
  if (status != 0)
  {
    // Wait for the measurement to complete:

    delay(status);

    // Retrieve the completed temperature measurement:
    // Note that the measurement is stored in the variable T.
    // Use '&T' to provide the address of T to the function.
    // Function returns 1 if successful, 0 if failure.

    status = pressure.getTemperature(T);
    if (status != 0)
    {
      // Start a pressure measurement:
      // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
      // If request is successful, the number of ms to wait is returned.
      // If request is unsuccessful, 0 is returned.

      status = pressure.startPressure(3);
      if (status != 0)
      {
        // Wait for the measurement to complete:
        delay(status);

        // Retrieve the completed pressure measurement:
        // Note that the measurement is stored in the variable P.
        // Use '&P' to provide the address of P.
        // Note also that the function requires the previous temperature measurement (T).
        // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)
        // Function returns 1 if successful, 0 if failure.

        status = pressure.getPressure(P,T);
        if (status != 0)
        {
          return(P);
        }
        else Serial.println("error retrieving pressure measurement\n");
      }
      else Serial.println("error starting pressure measurement\n");
    }
    else Serial.println("error retrieving temperature measurement\n");
  }
  else Serial.println("error starting temperature measurement\n");
}

The code compiles and uploads on to the board with no trouble but when I check the serial monitor its says [REBOOT BMP180 init fail (disconnected?)]

I have all the wires connected according to the instructions on the code.

Do you have any advice?

I'm trying to run the BMP180 altimeter off of a Arduino and I am having trouble with the code.

The code says that the hardware is not connected correctly, so the code must be wrong. How do you figure that?

Pictures, man. We like pictures. Out-of-focus, dark pictures with miles of wiring all the same color are best, but neat, small, in focus, properly lighted pictures of neat wiring will work, too. 8)

ok I will come back at 1:40 with them

Try running the I2C scanner to see if the device is communicating on the bus and confirm the address.

I did and it read it wasn't connecting.

ok so I had time here is my wiring

From the page source:

ok so I had time here is my wiring

Is the forum supposed to be able to find a server named 20170530_083330?

Picture not showing. Here is how to upload images.

I was kidding when I said an out-of-focus picture was good.

That is NOT a picture of your wiring.

That picture not readable. What is wrong with posting pictures using the instructions in the link that I provided? What, exact, BMP module are you using? Which Arduino?

He did nail it, though, PaulS.

here

20170530_140323[1].jpg

Every wire I've ever seen has two ends.

Im using the BMP180 pressure sensor

20170530_140828[1].jpg

Are these pictures better?

CPaulP:
Are these pictures better?

No. The BMP180 is NOT being used in isolation. You are trying to show us that is connected to the Arduino correctly, but failing to include the Arduino in the picture.

Ok sorry for the poor quality, but this is how we have it wired, the two pictures above show what they are plugged into.
please ignore the two wires running to the bottom.

20170530_143106[1].jpg

Are the wires actually soldered to the protoshield, or are they just stuck in the holes?

Did you run the I2C scanner sketch?

Yes they are and we tested them with a multimeter, and I did and no devices came up

and I did and no devices came up

If the scan completed quickly, and found no I2C devices, something is wrong with the wiring. An I2C device that is not working will hang the scanner. One that is not connected correctly to the bus will not.

ok well it was quick so im not sure what's wrong with the wiring, but I found a different code for it that works and the altimeter is working but giving weird data.

It is saying that the temp. is 55.04 f and 36747.96 mbar