Problems reading second pin

I've got proximity sensors connected to pins 10 and 11. I'm using digitalWrite and digitalRead as below but pin 10 always reads zero. It doesn't matter whether I run the program with pin 10 or 11 first. Both pins operate as expected when only one pin is manipulated (set both _pin to 10 or 11). I see many posts in the forum using multiple pins but nothing that clues me in. Here's the code.

void setup()
{
Serial.begin(9600);
}
void loop()
{
long duration;
int _pin;

_pin = 11;

pinMode(_pin, OUTPUT);
digitalWrite(_pin, LOW);
delayMicroseconds(2);
digitalWrite(_pin, HIGH);
delayMicroseconds(5);
digitalWrite(_pin,LOW);
pinMode(_pin,INPUT);
duration = pulseIn(_pin,HIGH);
duration = duration/74/2;

Serial.print("Pin ");
Serial.print (_pin);
Serial.print (": The distance to obstacles in front is: ");
Serial.print(duration);
Serial.println(" inch ");

delay(500);

_pin = 10;

pinMode(_pin, OUTPUT);
digitalWrite(_pin, LOW);
delayMicroseconds(2);
digitalWrite(_pin, HIGH);
delayMicroseconds(5);
digitalWrite(_pin,LOW);
pinMode(_pin,INPUT);
duration = pulseIn(_pin,HIGH);
duration = duration/74/2;

Serial.print("Pin ");
Serial.print (_pin);
Serial.print (": The distance to obstacles in front is: ");
Serial.print(duration);
Serial.println(" inch ");

delay(500);
}

Providing more information. We swapped out the Uno with a Mega 2650. I've tried other pins combinations (currently at 30 and 40). The proximity senors are 3 pin Ultrasonic Range Sensors from Radioshack.

The problem is timing. This code change fix it.

pinMode(ProxPin1, OUTPUT);
digitalWrite(ProxPin1, LOW);
delay(2);
digitalWrite(ProxPin1, HIGH);
delay(10);
digitalWrite(ProxPin1,LOW);
pinMode(ProxPin1,INPUT);
duration1 = pulseIn(ProxPin1,HIGH);