Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   VEX Ultrasonic Sensor delay (http://www.chiefdelphi.com/forums/showthread.php?t=45770)

P1h3r1e3d13 23-03-2006 18:07

VEX Ultrasonic Sensor delay
 
I am using EasyC and a VEX Ultrasonic sensor, and the "GetUltrasonic" command hangs up my code for 1/4 - 1/2 second each time it's used (once per loop).

Has anyone else had this happen? Has anyone had this not happen? Has anyone fixed this problem? Has anyone used the Ultrasonic sensor with "hard" C? If your ultrasonic code (Easy or hard) runs smoothly, would you mind sharing it?

Thanks


Edit: Should this be in the EasyC for FRC section? Sorry about that.

Kingofl337 26-03-2006 07:27

Re: VEX Ultrasonic Sensor delay
 
Are you running the current version. The ultrasonic should not hang your code.

Adam

P1h3r1e3d13 26-03-2006 19:07

Re: VEX Ultrasonic Sensor delay
 
Yup - current version of EasyC.

I know it shouldn't hang the code. I'm assuming you mean you have experienced it working properly, and I'll take that as a good sign.

I just realized it doesn't seem like I'm even getting data - I have it outputting to the OI display and all it shows is u000 or an occasional u012. It has worked before, though (in a completely different program), so the sensor itself is not broken.

BradAMiller 28-03-2006 06:31

Re: VEX Ultrasonic Sensor delay
 
Quote:

Originally Posted by P1h3r1e3d13
Yup - current version of EasyC.

I know it shouldn't hang the code. I'm assuming you mean you have experienced it working properly, and I'll take that as a good sign.

I just realized it doesn't seem like I'm even getting data - I have it outputting to the OI display and all it shows is u000 or an occasional u012. It has worked before, though (in a completely different program), so the sensor itself is not broken.

Is it possible to try a short test program to make sure that the sensor is working the way it is installed in your robot. If you are seeing the delay in the short program, please post it and I'll try to reproduce and fix the problem.

P1h3r1e3d13 28-03-2006 13:45

Re: VEX Ultrasonic Sensor delay
 
Thanks.
It may be a week or two now before I get the chance, but I will try that.
I appreciate your helpfulness.


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

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