 | | Re: nqc question
|
|
(...) I don't see how that could possibly work - where does this code turn the motor off? You need something like: task sensor_to_motor () { while ( 1 ) /* Do this forever... */ { Off ( motor ) ; /* Turn the motor off */ while ( sensor == 0 ) /* (...) (25 years ago, 16-May-02, to lugnet.robotics)
|
| |
 | | RE: nqc question
|
|
Roel, If it's not critical to monitor/control the motor with the RCX, you could use Lego's 9V battery box (part #5391 on S@H). It has a pushbutton-type switch. This saves you a motor port, sensor port, and programming. However, it is larger and not (...) (25 years ago, 16-May-02, to lugnet.robotics)
|
| |
 | | Re: latest legOS strangeness
|
|
I was torn between 'float' and 'brake' when implementing the remote control handler. I eventually opted for 'brake' since that is how the Lego RCX firmware does it. With regard to the strange motor behavior. I too noticed this while debugging the (...) (25 years ago, 16-May-02, to lugnet.robotics.rcx.legos)
|
| |
 | | Re: nqc question
|
|
(...) What combinations of if while and until did you use? I'm not sure if you tried this already, but I would think that you could simply use the following code: while(1) { if(SENSOR_X == 1) On(OUT_Y); until(SENSOR_X == 0) } that should check it (...) (25 years ago, 16-May-02, to lugnet.robotics)
|
| |
 | | output to input connection
|
|
I was sitting at my desk trying to figure out what it would take to send a variable value to the computer using NQC, and I couldn't figure anything out. I thought I might be able to use datalogging with a rotation sensor and a motor, but then I (...) (25 years ago, 16-May-02, to lugnet.robotics)
|