| | Q: Determining state of outputs
|
|
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 (...) (25 years ago, 13-Apr-00, to lugnet.robotics.rcx.nqc)
|
|
| | 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) !
|
|
| | Re: Q: Determining state of outputs
|
|
It works fine. Thanks for your help! Oliver (25 years ago, 25-Apr-00, to lugnet.robotics.rcx.nqc)
|