![]() |
Using VEX Ultrasonic Sensor
So I'm trying to use a VEX Ultrasonic Sensor(276-2155) But I'm having a difficult time trying to find the correct Labview Example that works with the VEX Ultrasonic Model. Where can I find an example? Also, when we program the Ultrasonic Sensor how would I get it that it sends information(about Distance) to the "User Messages" Text Box in the Driver Station and continuously updates it? Thanks
|
Re: Using VEX Ultrasonic Sensor
Quote:
Quote:
|
Re: Using VEX Ultrasonic Sensor
Most ultrasonic sensors are connected via the analog module of the CRIO. If that is true in your case, read the voltage from the analog channel and multiply it by 100 to get the distance from the sensor.
|
Re: Using VEX Ultrasonic Sensor
There used to be a set of (horribly written) vis in WPIlib to support an ultrasonic encoder with two digital ping/response lines. I believe they still exist, but I'm not sure.
It used the DIO Pulse feature and DIO Interrupt features to generate and listen to a pulse. Unfortunately, it was written to Wait On Interrupt, causing the thread that called the ultrasonic sensor to hang until either a pulse was returned, or the timeout (60ms) was reached. Unfortunately, the majority of the library is written synchronously with blocking calls like this, which is IMHO really really bad embedded code design. The FPGA has a lot of rarely or never used features which I have never seen used, including these DIO pulse and interrupt features, and a lot of DMA capabilities. |
| All times are GMT -5. The time now is 12:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi