Time of flight sensor - VL6180 . How to messure ranges over 255 mm?

Dear all,

I just connected a VL6180 sensor and am accessing it via the Pololu VL6180 library. It works fine for short ranges but the max distance I get back is 255 mm ... but the device is able to messure far above one meter and I need this distance.

What parameter do I need to set to get this information out.

This leads to a general question. I am used programming microchip microcontrollers. In their IDE I simply click on includes and am forwarded into the selected header file and can read more information there.

Is there a similar function in the Arduino IDE? Whenever I try to open the header files (no matter if I do it from the Arduino IDE or from a Windows notepad) I always end up with an unreadable junk of connected asci text what makes it impossible for me to find usefull data.

thanks
Michael

but the max distance I get back is 255 mm .

Try using variables larger than unsigned char.

Hi,

I read the sensor data into a variable of type int and then do a serial.print of this variable. As serial.print normally prints integer values without any problems I expect that the problem comes from the value that is written back from the sensor and therefore I have to change the sensor setup to larger ranges ...

regards
Michael

The problem is probably in the code you didn't post.

The value mentioned indeed points to a too small variable type.

I think I found the problem ... it was wrong product data provided from the seller. I found another homepage with much more detailed specs of the sensor. And the state that the sensor can only do 200 mm with highest resolution, or 400 with scaling 2 and 600 with scaling 3 (so you have to mulitply the result with 2 or 3, extending the range but reducing the resolution to 2 or 3 mm instead of 1 mm). So the parameter sent back really ranges from 0 to 255 only.

But coming back to my second question ... is there no way to read libraries and header files included in an arduino code comfortable?

regards
Michael

Bumo:
is there no way to read libraries and header files included in an arduino code comfortable?

Get a nice chair, or sit down on the sofa, grab a beer, and start reading. It doesn't get more comfortable than that.