Subject:
|
Re: Controlling Multiple RCX's from one PC
|
Newsgroups:
|
lugnet.robotics.rcx.java
|
Date:
|
Sun, 7 Jul 2002 21:09:44 GMT
|
Viewed:
|
3982 times
|
| |
| |
In lugnet.robotics.rcx.java, Jonathan Dallas writes:
> I'm working on a project that requires four RCX's to be controlled by one
> laptop. The program on the laptop is written in Java and the program on the
> RCXs is written in lejos. I'm using RCXPort to establish a connection
> between them.
>
> The problem I'm running into is that if I have more than one RCX running in
> front of the same tower, it causes an exception and then prevents the laptop
> from sending the data to the RCX.
>
> Has anyone found a way around this?
Hi Jonathan,
I send messages from the PC to 3 RCX's with no problem, but I use the Tower
object running on my PC, and Serial in the RCX. I don't use Stream objects
because they actually only send one byte at a time and not yet very reliable.
The trick in using the send(byte[] b, int n)method in Tower is to set the
correct value in b[0] before you send it.
To send a packet containing 1 data byte (packet length 2) use
packet[0]= 0xf7;
Example:
byte[] packet = {0xf7,0x08};
tower.send(packet,2);
will send the message containing the data byte 0x08 to every RCX within range
A packet containing 5 data bytes (length 6) can use 0x05 as packet[0]
If you wish, I can send you my source code.
Good luck,
Roger
glassey@ieor.berkeley.edu
|
|
Message has 2 Replies: | | Re: Controlling Multiple RCX's from one PC
|
| Hi, Roger and Jonathan!! I'd like to get your code too as I'm also interested to do the same thing as Jonathan. Would you mind also sending your source code about controlling multiple mindstorms using one PC to me? I'd like to have more exchange (...) (22 years ago, 8-Jul-02, to lugnet.robotics.rcx.java)
|
Message is in Reply To:
| | Controlling Multiple RCX's from one PC
|
| I'm working on a project that requires four RCX's to be controlled by one laptop. The program on the laptop is written in Java and the program on the RCXs is written in lejos. I'm using RCXPort to establish a connection between them. The problem I'm (...) (22 years ago, 7-Jul-02, to lugnet.robotics.rcx.java)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|