Subject:
|
Re: Palm IR to RCX
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 14 Feb 2002 04:59:38 GMT
|
Reply-To:
|
Dick Swan <dickswa@sbcglobal.^NoMoreSpam^net>
|
Viewed:
|
676 times
|
| |
| |
"Till Harbaum" <lego-robotics@crynwr.com> wrote in message news:200202131831.g1DIVKq06358@romulan.ipv6.tm.uka.de...
> Hi list,
<<snip>>.
>
> What i am still missing is a description of the commands, the lego remote
> control is using, since i'd like to add a remote control like software to my
> package. Does anyone here have infos about the commands, the remote is
> sending? And is this device receiving any data from the rcx? Probably not.
The remote is a one way only messaging scheme. It sends a "standard" RCX message
of opcode 0xD2 and two data bytes. The two data bytes contain a bit map directly
corresponding to the 16 buttons on the remote. There's a one-to-one mapping between
the 16 buttons on the remote and the two data bytes. Bit positions are documented in
the Lego© SDX. As long as buttons are pressed, remote will continuously repeat its
message. It doesn't just send the message once. When all buttons are released, then
the remote sends a single message with zeros in the data byte.
When you press one of the motor control buttons, the RCX firmware overrides existing
motor state and temporarily turns appropriate motors on-forward / on-reverse and sets a
100 msec timer. Timer is reset whenever a new remote message arrives. When timer expires,
RCX restores motor(s) to original state. Motors are also turned off when message arrives
with the bit map indicating motor control key is released. Any number of motors can be
simultaneously controlled. The motors are driven at full power.
The rest of the RCX firmware doesn't appear to handle multiple keys being pressed. If the
new keypressed bit map is different than the last received remote message then it does a
"switch" statement on the bit map with ten case labels. Each case value corresponds to the
bit map for a single key pressed. The case statement code performs the appropriate actions
for that button. This means the code doesn't handle the case of simultaneous key presses;
eg. a motor control button and the "sound" button.
The RCX does not generate a response message to the remote control.
|
|
Message is in Reply To:
| | Palm IR to RCX
|
| Hi list, about a week ago i got a ris 2.0 and have spent some time to write some communication routines for infrared communication between the rcx and my palms. I've so far been very successful and a first test software is available at (URL) (...) (23 years ago, 13-Feb-02, to lugnet.robotics)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|