Hooking up Second Arduino and Sensor using i2c

I want to connect two arduinos together using i2c, and also have a sensor running that uses the i2c inputs.

Using a breadboard, I hooked up both the a4 and a5 pins on the second arduino and the outputs on the TMP006 thermopile sensor (link: https://www.sparkfun.com/products/11859) to the first arduino’s a4 and a5. When I run the program, it hangs on the config method of the TMP006. When I disconnect the second arduino, it runs as it should. Surely there is a wiring issue, or maybe something else needs to be changed that I’m not aware of? Thanks.

#include <SPI.h>
#include <SD.h>
#include <stdint.h>
#include <math.h>
#include <Wire.h>
#include "I2C_16.h"
#include "TMP006.h"
Sd2Card card;
SdVolume volume;
SdFile root;
File userFile;

uint8_t sensor1 = 0x40; // I2C address of TMP006, can be 0x40-0x47
uint16_t samples = 4; // # of samples per reading, can be 1/2/4/8/16
int wait = 15;
int sensorValue;
int sound[5];
int temp[5];
boolean go = true;
String userInput;
boolean pool;

int delay3 = 0;
int delay4 = 0;
int delay5 = 0;
int delay6 = 0;
int delay7 = 0;
int delay8 = 0;
float count;
float seconds;

void setup()
  pinMode(10, OUTPUT);
  digitalWrite(10, HIGH);
  Serial.println("Searching for SD Card...");
  if (!SD.begin(10)) {
    Serial.println("Cannot find SD card.");
  Serial.println("SD Card found.");
  while (!Serial) {                                                      // Open serial communications and wait for port to open:
  Serial.println("Initializing SD card...");
  if (!card.init(SPI_HALF_SPEED, 10)) {                                  //***10 used to be: chipSelect***
    Serial.println("initialization failed.");
    go = false;
  else {
    Serial.println("Card Initialized");
  int sensor_temp = readDieTempC(sensor1);
  config_TMP006(sensor1, samples);                                   //*****hangs here*****

TMP006 library:

// Configures sensor, use before reading from it
void config_TMP006(uint8_t addr, uint16_t samples)
  write16(addr, TMP006_CONFIG, samples | TMP006_CFG_MODEON | TMP006_CFG_DRDYEN);

// Read raw sensor temperature
int16_t readRawDieTemperature(uint8_t addr)
  int16_t raw = read16(addr, TMP006_TAMB);

  raw >>= 2;
  return raw;

// Read raw thermopile voltage
int16_t readRawVoltage(uint8_t addr) 
  int16_t raw = read16(addr, TMP006_VOBJ);
  return raw;

// Calculate object temperature based on raw sensor temp and thermopile voltage
double readObjTempC(uint8_t addr) 
  double Tdie = readRawDieTemperature(addr);
  double Vobj = readRawVoltage(addr);
  Vobj *= 156.25;  // 156.25 nV per LSB
  Vobj /= 1000000000; // nV -> V
  Tdie *= 0.03125; // convert to celsius
  Tdie += 273.15; // convert to kelvin

  // Equations for calculating temperature found in section 5.1 in the user guide
  double tdie_tref = Tdie - TMP006_TREF;
  double S = (1 + TMP006_A1*tdie_tref + 
  S *= TMP006_S0;
  S /= 10000000;
  S /= 10000000;

  double Vos = TMP006_B0 + TMP006_B1*tdie_tref + 

  double fVobj = (Vobj - Vos) + TMP006_C2*(Vobj-Vos)*(Vobj-Vos);

  double Tobj = sqrt(sqrt(Tdie * Tdie * Tdie * Tdie + fVobj/S));

  Tobj -= 273.15; // Kelvin -> *C
  return Tobj;

// Caculate sensor temperature based on raw reading
double readDieTempC(uint8_t addr) 
  double Tdie = readRawDieTemperature(addr);
  Tdie *= 0.03125; // convert to celsius
  return Tdie;

Got Gnds connected between all the device also?

The grounds are hooked up in parallel also using a breadboard.

I'm hitting the post/min cap, so there may be a few minutes' delay between posts.

You'd save time if you didn't post the same question in different parts of the forum.