Thread: KOP rangefinder
View Single Post
  #1   Spotlight this post!  
Unread 15-02-2012, 23:31
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
KOP rangefinder

So I tried hooking up the KOP rangefinder to the analog breakout, but when I run the program, the only output I get is 0. I can hear the rangefinder pinging, and when I hook up a voltmeter, there is a change in voltage when an object is placed at different positions in front of it.

How I hooked it up:

[/quote]

Code I used:

AnalogChannel *rangefinder;
...
rangefinder = new AnalogChannel(1);
...
std::cout<<rangefinder->getVoltage()<<endl;
Reply With Quote