|
In lugnet.robotics.rcx.legos, Chris Daniel wrote:
> Hello, Im just recently getting back into playing with Legos. I bought my
> first house and had to fix it up before I could play. BrickOS was a lot easier
> to get into this time around thanks to BricxCC. BrickOS itself is better
> documented and has new features namely support of the Lego remote. Which brings
> me to my question how do I use it inside my program? This code is a simplified
> version of code that I wrote to control motor speed and direction on my marble
> rail. I would like to implement code that every time LRKEY_A1 is pressed rc_b +=
> 1 and every time LRKEY_A2 += -1. Any help or push in the right direction would
> be greatly appreciated. Thanks in advance Chris
Hi Chris,
The remote control code now resides in remote.h
http://cvs.sourceforge.net/viewcvs.py/brickos/brickos/include/remote.h?view=markup
and basically comes down to defining a callback function which gets called when
any remote key is pressed or released. I haven't kept up with the development,
but there is an early example of it's use here:
http://www.brickshelf.com/gallery/RoscoHead/towercrane/programming/crane2.c
HTH
ROSCO
NOTE: This code could be tidied up A LOT - it was just a quick hack really.
|
|
Message is in Reply To:
| | remote
|
| Hello, Im just recently getting back into playing with Legos. I bought my first house and had to fix it up before I could play. BrickOS was a lot easier to get into this time around thanks to BricxCC. BrickOS itself is better documented and has new (...) (20 years ago, 8-Nov-04, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|