Subject:
|
LEGO remote controller problem
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Sun, 27 Jul 2003 18:47:56 GMT
|
Viewed:
|
3174 times
|
| |
| |
Hi,
I have problems getting the LEGO IR remote controller to work (using brickOS
0.2.6.10).
I wrote a small test program that installs a lr handler function which
simply displays the received key value on the LCD. But when running this and
pressing the buttons on the remote controller, nothing happens (except the
IR indicator on the LCD flickers while holding the button). The remote
controller itself is o.k., as i have tested it with the standard firmware.
In order to investigate further, I have inserted calls to cputs() into the
decoding function in the kernel (lnp_integrity_byte), because I wanted to
see where in the decoding process it stops. Bad idea though, as the cputs
called from an interrupt routine just shows some crap on the LCD. However, I
was completely surprised when I ran the program on this modified kernel:
when pressing a button on the RC, the display first showed a lot of garbage
(as expected), but then finally displayed the correct key value (which means
the handler function got executed)!
After removing the cputs calls again, it doesn't work anymore and behaves
like at the beginning.
As writing to the LCD probably doesn't influence the IR communication, I
suppose it has something to do with timing. Executing the rx interrupt
routine takes much longer with the cputs calls in, of course.
But why does it only work when there is a delay in the interrupt routine?
I dont know if it matters, but I'm using RCX 1.0.
I would greatly appreciate if someone could shed some light on this issue.
Regards,
Christian
|
|
Message has 1 Reply:
11 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|