CMPS09 compass module troubles

I am trying to use this with I2C and have found plenty of examples.

Here is a current one with diagnostics in it:

#include <Wire.h>

#define deviceId 0x60 //defines address of compass

void setup(){
Wire.begin(); //conects I2C
Serial.begin(9600);
}

void loop(){
Serial.println("About to begin transmission");

Wire.beginTransmission(deviceId);

Serial.println("About to send a 2");
Wire.send(2);

Serial.println("About to end transmission");
Wire.endTransmission();

Serial.println("Transmission ended");
delay(10);

Serial.println("About to request data");
Wire.requestFrom(deviceId,
2);

delay(10);
int avail = Wire.available();
Serial.println("Wire.available()");
Serial.println(avail);

unsigned int value =
((unsigned int)
Wire.receive()) << 8;
value = value + ((unsigned int)
Wire.receive());

Serial.print("Data received, value is: ");
Serial.println(value);

delay(1000);
}

I get this output over an over and...

About to begin transmission
About to send a 2
About to end transmission
Transmission ended
About to request data
Wire.available()
0
Data received, value is: 0
About to begin transmission
About to send a 2
About to end transmission
Transmission ended
About to request data
Wire.available()
0
Data received, value is: 0

I have checked and rechecked wiring. It matches what is documented. 4.5V to to the power pin (and I have checked it with a meter and I use the power for other working components). I am using a MEGA 2560, so I am going to pins 20 and 21 respectively for SDA and SCL.

One thing I cannot find documented is the little component (diode? LED? it is so tiny I am not sure) that flashes sometimes when the CMPS09 is powered up. It rarely flashes; maybe every fifth time I power it on and never for more than a fraction of a second. If someone else has one, I would appreciate knowing if that is normal.

bump...

Am I the only one who has tried this component?

Talking to myself again, but following up to possibly help the next person who finds this thread looking for help...

I got up with support at Robot Electronics in the UK. It turns out that the choice of voltage (documented as 3.3 -5) is not arbitrary and needed to be 5 to match the processor. I had chosen the lower voltage just because I always choose the minimum anything will take to reduce heat and power consumption. Anyway, with 5v as input the code I posted works fine.

still more of my monologue...

This module is flaky. It works one day and not the next. I have soldered and resoldered connections; I am pretty sure this is not my fault. I will post back if this is resolved (I have contacted support again). Until it is, I would advice others not to buy one.

I have not tried the other modes. It did occur ti me that the problem could be mode detection. Support has asked me to return it and I am supposed to demo within days.

What problem are you seeing when you say the module works one day and not the next? Does it return incorrect data or freeze?

The voltage level of the I2C is 5V because of the Arduino, not the CMPS09. The data sheet for the 2560 says that a minimum voltage for a high is 0.7Vcc, and since the supply is 5v that makes 3.5v.

I should have come back and followed up. I will never be absolutely positive, but it seems that repositioning the module so that neither it nor its wiring is near the xBee 900 Pro and GPS modules increased the reliability into the very near 100% range. Apparently I2C and RF are not friends...