Go to Post Have you hugged a Martian today? (Dave, don't answer that.) - Billfred [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-04-2006, 17:10
irishninja's Avatar
irishninja irishninja is offline
I count as two people!
AKA: Nathan Bixler
FRC #0694 (Stuypulse)
Team Role: Marketing
 
Join Date: Feb 2006
Rookie Year: 2004
Location: New York
Posts: 267
irishninja is a glorious beacon of lightirishninja is a glorious beacon of lightirishninja is a glorious beacon of lightirishninja is a glorious beacon of lightirishninja is a glorious beacon of light
Send a message via AIM to irishninja
Ultrasonic Distances

What is the analog number for 1 foot for the ultrasonic sensor?
__________________


VEX Robotics Blog
Reply With Quote
  #2   Spotlight this post!  
Unread 30-04-2006, 20:25
foobert foobert is offline
Registered User
no team
 
Join Date: May 2005
Location: oakland, ca
Posts: 87
foobert is a jewel in the roughfoobert is a jewel in the roughfoobert is a jewel in the rough
Re: Ultrasonic Distances

the ultrasonic sensor does not return an analog value. it returns the time it takes sound to make a round trip out from the sensor to whatever's out there and back to the sensor. the distance can be had by multiplying that time by the speed of sound through air. you need to know the scale of the units returned by the routine that reads the sensor. microseconds, milliseconds, whatever.

or you can put something a foot in front of the sensor and see what kind of reading you get. note that there will be a little jitter, so you'll want to average a couple of different readings and then rather than comparing future readings to the value you get, check to see if they're close. for instance...

if ((new_reading >( one_foot - fudge_factor)) and (new_reading < (one_foot + fudge_factor))) {...

or you could wait for a reply from someone who's used easyC

Quote:
Originally Posted by irishninja
What is the analog number for 1 foot for the ultrasonic sensor?
Reply With Quote
Reply


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
VEX Ultrasonic Sensor delay P1h3r1e3d13 Programming 4 28-03-2006 13:45
Radio Control and Ultrasonic Sensor jeffmorris FIRST Tech Challenge 3 25-03-2006 11:06
Vex navigation with ultrasonic and encoders GlennGraham Electrical 4 13-01-2006 12:58
Using and Coding an ultrasonic sensor Jaine Perotti General Forum 14 06-08-2004 14:13


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

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