Servers by jDrones

Maxbotic I2C sonar. Bad range of readings

Hi all,

I’m using a sonar Maxbotix I2C (MB1242) in my quadcopter. I’m following the steps indicated here:

Everything seems to be ok. The sonar is detected and I get the readings. The problem is that the range (or scale) of the readings is quite strange.
Instead of getting readings in the range [0.2 - 7] meters (or centimeters [20 - 700]), I’m getting values between 327 and 335 approximately. I mean, for a distance of 20cm (or shorter) I get a reading of 327.88. For larger distances, the value varies until a maximum of 335.3. So the distances are being detected properly, however the values returned are in a incorrect scale.

I tried with two different sonars (same model) and I’m getting the same results, so it is not a malfunctioning of the sonar device.
I keep the same parameters as indicated in the link above. Does anyone have the same problem or any idea about what could be happening?

Thank you in advance.

Servers by jDrones