|
Hello everybody!
For the building of my next robot an answer to the following question could
be very helpful:
Is there any possibility in NQC to get the state of an output (on, off,
direction). While running a program I would like to control one output
directly by the IR-remote. The program needs to know whether the (directly
controlled) output is on or off. Information about the direction of the
attached motor would be perfect.
Any information would be a great help.
Thanks in advance
Oliver
--
+-----------------------------------------------------+
| Oliver Petermann (aka Pepifax, aka Peps, aka P...) |
| email: peppo.p@gmx.at |
+-----------------------------------------------------+
|
|
Message has 2 Replies: | | Re: Q: Determining state of outputs
|
| (...) I'm not the expert on this but... I've been playing with firmware 2.0 and I think you can read the state of your sensors directly. (The same way you read the Battery level? Dave?) Hopefully Dave will answer you for sure. Dean -- Coin-Op's For (...) (25 years ago, 13-Apr-00, to lugnet.robotics.rcx.nqc)
| | | Re: Q: Determining state of outputs
|
| (...) Yes, there is a 'data source' for motor status. I never bothered figuring it all out, so there isn't a defined API for it, but you can add it yourself: #define MotorStatus(motor) @(0x30000 + (motor)) use motor 0 for output A, 1 for B, 2 for C. (...) (25 years ago, 14-Apr-00, to lugnet.robotics.rcx.nqc) !
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|