Go to Post I don't think it's that big of a deal if FIRST makes a few mistakes or cuts back every now and then. Personally, I'm just glad I have the opportunity to be in this program. - Crop-Circles [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 31-01-2017, 00:05
IamCshort IamCshort is offline
Registered User
FRC #5713 (Cyber Bucs)
Team Role: Team Spirit / Cheering
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Flint
Posts: 7
IamCshort is an unknown quantity at this point
Send a message via AIM to IamCshort
Ultrasonic ?

I want to use an ultrasonic sensor to drive a set distance how do i go about doing that ?
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2017, 09:48
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,286
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Ultrasonic ?

Assuming you know how to install the sensor and get readings:

1) Get a reading from the UltraSonic. this will tell you the distance to something in front of the robot
2) Drive
3) While driving, continuing to read distances
4) When the change in distance equals the desired distance, stop driving.

Notes:
a) This only works if there is something within the range of the sensor.
b) You might want to stop driving a little before the desired distance in order for the robot to coast to a stop at the correct distance.
c) If something crosses in front of your robot, that will be a problem.
d) In general, you are better off using encoders to guage distance, and the ultrasonic as a check that you are close to the final destination (for example, in front of the peg).
__________________

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


All times are GMT -5. The time now is 04:11.

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