agartner01
15-02-2012, 23:31
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:
http://i41.tinypic.com/28wifm.jpg[/QUOTE]
Code I used:
AnalogChannel *rangefinder;
...
rangefinder = new AnalogChannel(1);
...
std::cout<<rangefinder->getVoltage()<<endl;
How I hooked it up:
http://i41.tinypic.com/28wifm.jpg[/QUOTE]
Code I used:
AnalogChannel *rangefinder;
...
rangefinder = new AnalogChannel(1);
...
std::cout<<rangefinder->getVoltage()<<endl;