Go to Post Sometimes in discussions regarding rules or differences of opinion, the threads start feeling like a dog chasing its tail, going round and round. - JaneYoung [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, 19:52
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 "GetUltrasonic" hangup

Has anyone tried using the VEX Ultrasonic sensor with EasyC for FRC? The GetUltrasonic command seems to be taking 1/4 - 1/2 second to execute (which causes big problems). Does it take that long for everyone else?
  #2   Spotlight this post!  
Unread 24-03-2006, 07:49
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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: "GetUltrasonic" hangup

Quote:
Originally Posted by P1h3r1e3d13
Has anyone tried using the VEX Ultrasonic sensor with EasyC for FRC? The GetUltrasonic command seems to be taking 1/4 - 1/2 second to execute (which causes big problems). Does it take that long for everyone else?
Question: is this the first time trying the sensor or has it been working and recently stopped working?

The ultrasonic sensor code will loop while it's getting no result from the sensor, then time out after 2 seconds. If you're seeing that, try checking the connections or the sensor - that the input port on the sensor is connected to the digital output port on the RC and the output port on the sensor is connected to the interrupt port on the RC (digital I/O port 1-6).

A bad connection will result in no returns from the sensor and the timeout will occur.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #3   Spotlight this post!  
Unread 24-03-2006, 17:40
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: "GetUltrasonic" hangup

I've checked the connections, and I've used the sensor before, but not in any capacity where I would've noticed the response time.

It is possible that it didn't have anything in range of of which to reflect. Would that cause the timeout?
I'll check whether response time improves when I put something close to the sensor.
  #4   Spotlight this post!  
Unread 25-03-2006, 07:00
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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: "GetUltrasonic" hangup

Quote:
Originally Posted by P1h3r1e3d13
I've checked the connections, and I've used the sensor before, but not in any capacity where I would've noticed the response time.

It is possible that it didn't have anything in range of of which to reflect. Would that cause the timeout?
I'll check whether response time improves when I put something close to the sensor.
If there is nothing in range, then the hardware in the rangefinder returns a maximum value - which wouldn't cause the timeout.

Is the sensor returning valid values after the timeout?
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #5   Spotlight this post!  
Unread 12-04-2006, 00:44
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: "GetUltrasonic" hangup

Yeah, that's what I thought (about out of range).
And no, it never returns a valid value, so far as I can tell. The user byte display on the OI should be showing the US distance, but all I ever see is 000 or occasionally 012 (for just one loop).
  #6   Spotlight this post!  
Unread 27-04-2006, 11:16
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,611
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: "GetUltrasonic" hangup

I have also noticed a considerable hang time when reading the sonar sensor. From testing mulitiple sonars, the problem is usually hardware related such as a loose cable or connector. Always listen for a faint clicking noise to make sure the sonar is operating.

However, the sonar driver needs updating on the easy C kit, possibly something more interrupt based similar to kevin watson's accelerometer code.
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
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


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

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