Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Questions about ultrasonic (http://www.chiefdelphi.com/forums/showthread.php?t=70803)

beefy1 23-12-2008 12:36

Questions about ultrasonic
 
im using wpilib, are the pings automatically sent or i have to call this? please if you can, show me an example of code how to check if the robot is place by 2 inches from a wall.

tdlrali 23-12-2008 13:17

Re: Questions about ultrasonic
 
Are you using LV or WR?
In C++, you have two options. You can repeatedly call the Ping() method, or you can set your sensor to automatic mode using SetAutomaticMode(true). Either way, after you've gotten at least one measurement back, use GetRangeInches or GetRangeMM to get the respective measurement.

keehun 30-12-2008 22:59

Re: Questions about ultrasonic
 
And if you are using LabView, you can get the manual analog input and divide it by howmany volts the spec sheet says is per centimeter or meter.

DonRotolo 02-01-2009 20:35

Re: Questions about ultrasonic
 
It also depends on which ultrasonic sensor you are using. The Maxbotix sensor can deliver the distance as a voltage of 0 to 2.55 volts, corresponding to 0 to 255 inches. In that case you would just read the analog value.

Daniel_LaFleur 02-01-2009 21:43

Re: Questions about ultrasonic
 
Quote:

Originally Posted by Don Rotolo (Post 789493)
It also depends on which ultrasonic sensor you are using. The Maxbotix sensor can deliver the distance as a voltage of 0 to 2.55 volts, corresponding to 0 to 255 inches. In that case you would just read the analog value.

How linear are they and is there a myopic zone?


All times are GMT -5. The time now is 00:10.

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