To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 158
157  |  159
Subject: 
Re: Communication between 2 Robots - Movement transmition
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Sat, 23 Feb 2002 02:42:11 GMT
Viewed: 
3403 times
  
Hi Vasilis and Jürgen,
I think it can be done with only 1 thread in each.
In my Java line follower, the main loop reads the light sensors (I use 2)
and issues commands to the two motors.   It should be possible to encode the
commands into a byte and transmit to the slave within the same loop.
In the slave, the main loop would listen for the incoming message, decode
it, and issue the corresponding commands to its motors.
It may be difficult for the slave to exactly match the movements of the
master becauses of differences in motor performance and differences in
battery voltage. A second problem has to do with the unreliability of
communications - the slave may fail to receive a command.
An interesting project - good luck.
Roger
PS  I think you will enjoy working with LeJos



Message is in Reply To:
  Re: Communication between 2 Robots - Movement transmition
 
Hi Vasilis, (...) I think the easiest is to pretend that the same type of communication that you want to have with the slave also goes on within the master. So you need (at least) two threads, one that looks at the line and one that does the (...) (23 years ago, 22-Feb-02, to lugnet.robotics.rcx.java)

4 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