To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 483
482  |  484
Subject: 
Re: NQC troubles
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 29 Feb 2000 14:31:06 GMT
Reply-To: 
mattdm@mattdm.org!StopSpammers!
Viewed: 
1989 times
  
Rob Stehlik <Robbby31@hotmail.com> wrote:
OnFwd(OUT_A);
if (SENSOR_1 == 1)
Off(OUT_A);

Hi. The problem is that the if statement doesn't wait -- it just checks
once, and if it fails, goes right past. So, if you have the switch pushed
down right at the beginning, it'll work. Try this:

OnFwd(OUT_A);
until (SENSOR_1 ==1);
Off(OUT_A);


--
Matthew Miller                      --->                  mattdm@mattdm.org
Quotes 'R' Us                       --->             http://quotes-r-us.org/



Message has 1 Reply:
  Re: NQC troubles
 
Thanks for your help. I was also wondering if there is a way to have the motor turn off at any time in the program when the touch sensor is pushed, rather than having to re type the until statements a bunch of times. would I have to use a task for (...) (25 years ago, 1-Mar-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  NQC troubles
 
Hi, I am pretty new to the lego robotics thing (but I have been a lego maniac since birth), and have had a lot of fun tinkering with the mindstorms set that I got for Christmas. I have recently downloaded Nqc and RCX command center. While working on (...) (25 years ago, 29-Feb-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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR