Go to Post I might be singing a different tune if I get a water jet for Christmas. :) - FrankJ [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 06-05-2006, 08:42
Ctx32 Ctx32 is offline
Registered User
no team
 
Join Date: Apr 2006
Location: Florida
Posts: 10
Ctx32 is an unknown quantity at this point
Ultrasonics

I need help, I'm trying to setup 4 Ultras using EasyC.
But I'm new at this and can't get the program correct.
I get 1 working and try to add the next one, then nothing.
Can someone help me?
Calvin
Reply With Quote
  #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,367
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
  #3   Spotlight this post!  
Unread 06-05-2006, 14:31
Ctx32 Ctx32 is offline
Registered User
no team
 
Join Date: Apr 2006
Location: Florida
Posts: 10
Ctx32 is an unknown quantity at this point
Re: Ultrasonics

Quote:
Originally Posted by Gdeaver
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.
I set the first sonar and it works great and haven't noticed a time out on it.
It prints to screen as long as I obstruct it.
But I try to initialize the 2nd sonar and both sonars go dead or the first one goes out and the second one prints to screen.
It's got to be my programming.
Can a pic be sent to this forum?
Calvin
Reply With Quote
  #4   Spotlight this post!  
Unread 06-05-2006, 14:32
Ctx32 Ctx32 is offline
Registered User
no team
 
Join Date: Apr 2006
Location: Florida
Posts: 10
Ctx32 is an unknown quantity at this point
Re: Ultrasonics

Quote:
Originally Posted by Ctx32
I set the first sonar and it works great and haven't noticed a time out on it.
It prints to screen as long as I obstruct it.
But I try to initialize the 2nd sonar and both sonars go dead or the first one goes out and the second one prints to screen.
It's got to be my programming.
Can a pic be sent to this forum?
Calvin
Does anyone have an example I could look at?
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 03:18.

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