|
In article <FKpMu7.GHw@lugnet.com>, "Vlad Dumitrescu"
<vladdu@NOSPAM.hotmail.com> wrote:
> Hi all!
>
> Having a touch of flu, I might be asking a FAQ here... if so, sorry.
>
> How can the RCX communicate with the PC, except by SendMessage? The Spirit.ocx
> has the Poll functionality to ask for RCX state - is there any similar stuff in
> NQC? And are there any cute libraries to use on PC, other than serial comm
> programs?
You can use the -raw option for nqc to send raw commands (including the
poll command) to the RCX. Not pretty, but it works in a pinch.
As for libraries, I'm not sure what qualifies as "cute", but within NQC,
all of the RCX communication is containd within its own set of classes
(which I call rcxlib). Compile and link against these classes to add RCX
functionality to your own C++ programs. The access is robust, but not
"high level". For example, there isn't a method to turn on a motor.
Instead, you build the appropriate RCX command (again using predefined
classes and constants), then send this command over to the RCX using the
RCX_Link class. The result is a very flexible system, but one that
requires you to know a bit about the RCX bytecodes in order to use it
effectively. What you don't have to worry about is the particular command
formatting, serial port access, retry and timeout parameters, etc.
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message has 1 Reply:
Message is in Reply To:
7 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
|
|
|
|