Multiple SHT1x sensors

Hello all. I've been using this forum for about a month now, just going through old threads and getting 90% of my questions answered that way... but tonight I got a shipment of new sensors for my project and I've hit a bit of a roadblock. Thus the new account.

I got two SHT10 sensors, connected to my Mega, and I'm having trouble getting readings from the second one. I can get one to work just fine, but as soon as I try to read from the second, I either get gibberish, or (seemingly) no communication. I've tried using the sht1xalt-master.h library, but that only gets me one sensor (and that sensor's readings are very accurate, when cross-referenced with two K-Type thermocouples). I've also tried the Multple_SHTs.pde example and that will "read" the second sensor, but not the first sensor. When I say it will "read" it, it shows -39.úü celsius and 0.10% humidity when I know it's between +24.2 and +24.5 celsius and roughly 42% humidity...

All my wiring is correct (common +, -, and clk, each data pin has it's own input on the board according to the examples I'm using). Data on sensor 1 is D3 and sensor 2 is D4.

So basically, what I want to know is... has anyone worked with these before and been able to get multiple sensors to work correctly? If so, where do I go from here? Is there a way to get the sht1xalt-master.h library to work with multiple sensors relatively easily without having to restructure the whole .cpp file? or should I try to get the Multiple_SHTs to work? I also tried the Sensiron.h library, and it wont even compile, saying there's a ton of variables not defined in the .cpp file...

I'm very much a noob to programming for this platform (I'm used to doing HTML/PHP, not so familiar with C++ at all), so please go easy on me...

EDIT: I don't really know what I did, but it seems to me that I swapped the data lines from sensor 1 and sensor 2 on the arduino, and now sensor 2 (D3) is reading bang on (24.07 celsius and 43.9% humidity) while sensor 1 (D4) is reading -39.úü celsius.
Also, I don't know if this is a contributing factor or not, but I also have an ethernet shield ontop of the Mega that the jumpers are being wired into. Not really doing anything with the ethernet shield yet, until I actually get the sensor readings working... but that shouldn't affect much, should it?

A schematic and some code would be far more useful than all that hand-waving.

Here is the SHT1xalt library, but I am having trouble getting the second one to read anything.

/**
 * A simple example demonstrating usage of the sht1xalt library.
 **/

#include <Arduino.h>
#include <sht1xalt.h>

// Set these to whichever pins you connected the SHT1x to:
#define dataPin 3
#define clockPin 2

// Set this number larger to slow down communication with the SHT1x, which may
// be necessary if the wires between the Arduino and the SHT1x are long:
#define clockPulseWidth 1

// The next lines are fine if you're using a 5V Arduino. If you're using a 3.3V
// Arduino (such at the Due), comment the next line and uncomment the one after:
//#define supplyVoltage sht1xalt::VOLTAGE_5V
#define supplyVoltage sht1xalt::VOLTAGE_3V5

// If you want to report temperature units in Fahrenheit instead of Celcius,
// comment the next line and uncomment the one after:
#define temperatureUnits sht1xalt::UNITS_CELCIUS
//#define temperatureUnits sht1xalt::UNITS_FAHRENHEIT

sht1xalt::Sensor sensor( dataPin, clockPin, clockPulseWidth,
                         supplyVoltage, temperatureUnits );

void setup() {
  Serial.begin(9600);
  Serial.println("Starting up (2s delay)");
  delay(2000);
  
  sensor.configureConnection();
  // Reset the SHT1x, in case the Arduino was reset during communication:
  sensor.softReset();
}

void loop() {
  float temp;
  float rh;
  sht1xalt::error_t err;
  
  delay(2000);
  
  err = sensor.measure(temp, rh);
  if (err) {
    switch (err) {
      case sht1xalt::ERROR_NO_ACK:
        Serial.println("SHT1x failed to acknowledge a command!");
        break;
      case sht1xalt::ERROR_MEASUREMENT_TIMEOUT:
        Serial.println("SHT1x failed to produce a measurement!");
        break;
    }
    sensor.softReset();
    return;
  }
  
  Serial.print("The temperature is ");
  Serial.print(temp);
  if (sensor.getUnits() == sht1xalt::UNITS_CELCIUS) {
    Serial.print(" Celcius");
  } else {
    Serial.print(" Fahrenheit");
  }
  Serial.print(", the relative humidity is ");
  Serial.print(rh);
  Serial.println("%");
}

and a link to the Multiple sensor code that only "reads" one sensor:

and a link to the Multiple sensor code that only "reads" one sensor:

Why did you put your code in the rubbish bin? Use Reply (NOT Quick Reply) and attach your code to your reply.

Why are you attaching both sensors to the same set of pins?

PaulS:
Why did you put your code in the rubbish bin? Use Reply (NOT Quick Reply) and attach your code to your reply.

Character limit was reached.

PaulS:
Why are you attaching both sensors to the same set of pins?

Eh? The data pin from sensor 1 was going to D3 on the Arduino and data pin from sensor 2 was going to D4.
I may have solved the issue, though. I neglected to inform that I had an ethernet shield installed as well and was attaching the wires to the shield. My shield doesn't say this, but when I was building the setup in Fritzing, I noticed that the shield in there had SDCS on D4. So changing to D5 got it working.