Distance Measurement for Camera Assistant.

I am attempting to make a distance measurement rangefinder to be mounted on a camera and the readout to be transmitted to a wireless display. I was thinking of using a 2.8 4d systems display. The lidar-lite would mount to the top of the camera over the lens. I would have to figure out a way to calibrate the reading to the cameras inmage plane.



My plan is to use the Lidar-lite to do the distance reading. The Lidar-lite measures in cm. How do I convert from cm to read Feet and inches?

Second, how would I offset the reading to calibrate to the film plane of the camera. I would like to be able to control this from the wireless display. I understand that I can zero the reading. So is there a code that could be written to manually move this offset?

Third transmit the readout to a separate display I could at least a 100 ft from the camera?

My plan is to build this as a open source project, so that other camera assistants can build one of there own, since the ones on the market cost a premium price between $3,000 - $10,000.

I found this code for converting cm to feet and inches. How would I apply this to get distance code from github?

#include <stdio.h>

const double cm_to_inch = 2.54; // (0.39);

int main(void)


float cm, inches;

int feet;

printf("Enter a height in centimeters (<=0 to quit): ");

scanf("%f", &cm);

while(cm > 0) {

inches = cm / cm_to_inch;;

feet = inches/12;

inches = inches-(feet*12);

printf("%.1f cm = %d feet, %.1f inches\n", cm, feet, inches);

printf("Enter a height in centimeters (<=0 to quit): ");

scanf("%f", &cm);



return 0;


You should learn Arduino first, especially when you don't know much C.

You may have the most profound thought but if you can't express it to the machine, the machine won't go. Learn the language to at least the basic level. In your IDE under FILE is Examples and the menu for that has the tutorial categories up top and library examples down from there.

All the tutorials have a page you can get to from the forum through the Learning link in the green bar near the top of the forum page. If you surf the links and bookmark the main pages you will have your own set of links to form your own online reference manual that you can refer to even as you code.



There's more by at least another 6 major links, don't forget to find The Playground.