Go to Post The code is hopefully pretty self-documenting, but I haven't had time to comment it (kinda trying to build a robot at the moment). - RyanCahoon [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-03-2006, 18:07
P1h3r1e3d13's Avatar
P1h3r1e3d13 P1h3r1e3d13 is offline
Unregistered User
FRC #0295
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: San Diego/Granite Bay
Posts: 46
P1h3r1e3d13 is an unknown quantity at this point
Question 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.

Last edited by P1h3r1e3d13 : 23-03-2006 at 18:48. Reason: See below
  #2   Spotlight this post!  
Unread 26-03-2006, 07:27
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: VEX Ultrasonic Sensor delay

Are you running the current version. The ultrasonic should not hang your code.

Adam
  #3   Spotlight this post!  
Unread 26-03-2006, 19:07
P1h3r1e3d13's Avatar
P1h3r1e3d13 P1h3r1e3d13 is offline
Unregistered User
FRC #0295
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: San Diego/Granite Bay
Posts: 46
P1h3r1e3d13 is an unknown quantity at this point
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.
  #4   Spotlight this post!  
Unread 28-03-2006, 06:31
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #5   Spotlight this post!  
Unread 28-03-2006, 13:45
P1h3r1e3d13's Avatar
P1h3r1e3d13 P1h3r1e3d13 is offline
Unregistered User
FRC #0295
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: San Diego/Granite Bay
Posts: 46
P1h3r1e3d13 is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vex Ultrasonic Sensor not responding SomeoneKnows Programming 6 18-12-2007 16:48
Radio Shack to discontinue VEX? jeffmorris General Forum 52 24-03-2006 16:33
Vex navigation with ultrasonic and encoders GlennGraham Electrical 4 13-01-2006 12:58
VEX UltraSonic and Encoder SOLD OUT... Chris_Elston Electrical 5 09-01-2006 13:22
VEX Robotics vexrobotics FIRST Tech Challenge 8 30-03-2005 23:25


All times are GMT -5. The time now is 22:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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