Thanks very much. I tried with and without 3.3V and it looks like my problem is something different. To track why the output fails after printing "VCNL" I edited the setup as follows:
void setup() {
Serial.begin(9600);
Serial.println("VCNL");
Serial.println("test another line1");//added to test
Wire.begin();
Serial.println("test another line2");//added to test
uint8_t rev = read8(VCNL4000_PRODUCTID);
Serial.println("test another line3");//added to test
if ((rev & 0xF0) != 0x10) {
Serial.println("Sensor not found

");
while (1);
}
My output is
VCNL
test another line1
test another line2
...and then it stops. No error message, and the serial port is still up.
So it is held up at this line:
uint8_t rev = read8(VCNL4000_PRODUCTID);
Is this the kind of hangup I can expect to get if in fact I don't have the sensor wired up correctly? (even though I think I do). I am guessing it is something basic. Any suggestions would be appreciated.