Thread: Ultrasonics
View Single Post
  #2   Spotlight this post!  
Unread 06-05-2006, 08:59
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,363
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Ultrasonics

The easy c function has to be setting up a timer to time how long it takes from ping to reception of the ping. The function probably times out after 30 to 40 ms. Depending on how the initialize function is written, you may be able to in a loop initialize sonar one, read sonar 1, initialize sonar 2, read sonar 2, take action, loop goto sonar 1, ect.
Reply With Quote