To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7130
7129  |  7131
Subject: 
robot project
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 25 Nov 1999 09:47:17 GMT
Original-From: 
Michael Miranda <mikmiranda@yahoo.comSTOPSPAMMERS>
Viewed: 
702 times
  
Hi,

I’m trying to get a robot to turn a face the owner
using rf.  I have one transmitter (that the owner will
wear) and three receivers (set up in a triangle).  We
want to use the transmitter as a beacon.  Then
whichever receiver gets the signal first, that’s where
the owner is and where we want to turn to.  We can
transmit to the receivers, but we can’t see which
receiver is getting the signal first.  I am trying to
look at the falling edge of one pulse.  In my program
any receiver with a high signal will set its time
variable to i (counter).  And the last time its high
corresponds to the falling edge.  The problem seems to
be the time of the loop is too slow and with in one
loop all the signals change (at the same time).  What
I would like to do is speed up the loop, if that is
possible. Can anyone help, is my thinking wrong?
Here, is my code:

float i, ta, tb, tc;
void main(void)
{
ta=0.;
tb=0.;
tc=0.;
i=0.;
while (i<200.)
{
if (digital(11)==1)
tb=i;
if (digital(12)==1)
ta=i;
if (digital(13)==1)
tc=i;
i++;
}
printf("A%d B%d \rC%d\n",ta,tb,tc);
}


Mike

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com



Message has 1 Reply:
  Re: robot project
 
Mike, Don't think it's going to work. 186,000 miles per second is almost 1,000,000,000 feet per second ... so if your receiver antennas are 12 inches apart the time difference of the received pulse will be 0.001 microseconds maximum ... way too (...) (25 years ago, 25-Nov-99, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR