View unanswered posts | View active topics It is currently Tue Jul 22, 2014 7:03 pm






Reply to topic  [ 3 posts ] 
Ultrasonic sensor problems 
Author Message
Rookie

Joined: Wed Dec 05, 2012 11:00 am
Posts: 9
Post Ultrasonic sensor problems
I am having trouble programming my ultrasonic sensor to make it sense anything in front of it.
I am using while ( Sensorvalue[Ultrasonic] < 2) then have it move in the while loop
However, when I point my robot to a wall that is really close to it (<1 inch). It doesn't seem to function.
What is the problem?. Please help.


Wed Dec 05, 2012 11:09 am
Profile
Novice

Joined: Sun Oct 21, 2012 10:01 pm
Posts: 76
Post Re: Ultrasonic sensor problems
Can you please post the entire code inside of [code] and [/code] tags? That'll help us diagnose a syntax or logic error.


Wed Dec 05, 2012 11:54 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 556
Post Re: Ultrasonic sensor problems
This may also be an issue of the sensor being outside of its usable range. Sonar sensors have a maximum and minimum range that they will work properly within; if the object being detected is too far away, the echoes either won't reach the sonar receiver with enough strength to be detected, or will take too long to 'ping' back to the receiver. If the object is too close, the sound wave 'pings' back too quickly for the sonar sensor to read it.

Taking a look at the Ultrasonic Range Finder's product page on VEX's website, we see that the usable range for the sensor is "1.5 in to 115 in". Thus, moving an object any closer to the sensor than that may give unreliable results.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Wed Dec 05, 2012 12:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.