PDA

View Full Version : How to program sonar


FearlessLeader
02-11-2009, 04:24 PM
Our Team is using the LV-MaxSonar-EZ3

We are having a lot of trouble programing for the sonar.
Can anyone post some C ++ code that uses the sonar. As far as I have seen there is no sample code for the sonar.

Thanks a lot :)

wt200999
02-11-2009, 10:39 PM
It depends on how you have it wired. I am guessing you are using analog?

If so use the AnalogChannel class and use the AnalogChannel::GetVoltage() to get your voltage and multiply that value accordingly (a value you can find in the EZ3 datasheet)