Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   How to hook up KOP rangefinder (http://www.chiefdelphi.com/forums/showthread.php?t=102312)

agartner01 08-02-2012 20:34

How to hook up KOP rangefinder
 
Do I just hook it to the analog breakout like in this picture?


kinganu123 08-02-2012 21:20

Re: How to hook up KOP rangefinder
 
Yes
But let your programmers know that they'll have to write their own class that uses the analogchannel. This mainly pertains to java, not sure about other languages.

theprgramerdude 08-02-2012 21:28

Re: How to hook up KOP rangefinder
 
Yes, that will do it. You also don't have to write your own class, per se, as everything in java can be coded almost like in C, although it would be beneficial.

agartner01 08-02-2012 21:37

Re: How to hook up KOP rangefinder
 
Quote:

Originally Posted by kinganu123 (Post 1122714)
Yes
But let your programmers know that they'll have to write their own class that uses the analogchannel. This mainly pertains to java, not sure about other languages.

Yeah, I do both electrical and programming in our 4 person team. So something like this:

Code:

float distanceToTarget = 0.0;
...
AnalogChannel *rangefinder;
...
rangefinder = new AnalogChannel(1);
...
rangefinder->getVoltage() * multiplier = distanceToTarget;



All times are GMT -5. The time now is 01:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi