View unanswered posts | View active topics It is currently Mon Sep 21, 2020 12:11 pm

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

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

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
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
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 updated help documentation and the ROBOTC Forums.

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

Who is online

Users browsing this forum: No registered users and 2 guests

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:  

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