|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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.
|
|
#4
|
|||||
|
|||||
|
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.
|
|
#5
|
||||
|
||||
|
Re: Questions about ultrasonic
How linear are they and is there a myopic zone?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ultrasonic will not work with another Ultrasonic plz help | Jackel148 | Programming | 10 | 10-05-2006 15:31 |
| Questions about Championship | RoboMadi | Championship Event | 9 | 17-03-2006 21:12 |
| 2 Questions about OI | theCowboyKnight | Control System | 2 | 27-01-2005 11:38 |
| questions about competition | archiver | 2000 | 2 | 23-06-2002 22:06 |
| Questions about Battlecry | Todd Derbyshire | Off-Season Events | 4 | 12-06-2002 23:16 |