To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.robolabOpen lugnet.robotics.rcx.robolab in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / ROBOLAB / 337
336  |  338
Subject: 
Re: Waiting for more than one event
Newsgroups: 
lugnet.robotics.rcx.robolab
Date: 
Sun, 29 Aug 2004 23:14:17 GMT
Viewed: 
8948 times
  
In lugnet.robotics.rcx.robolab, Alan wrote:
What is the best way of waiting for more than one type of event? I want to turn
on a motor and run it for 5 seconds or until the tough sensor is pressed,
whichever comes first.

This seems like such a basic problem that I'm quite sure there must be a
standard way of doing it.

Thanks

Alan

You could setup two concurrent events or do something like :

Loop until 5 seconds is up
If Touched, exit loop



Message is in Reply To:
  Waiting for more than one event
 
What is the best way of waiting for more than one type of event? I want to turn on a motor and run it for 5 seconds or until the tough sensor is pressed, whichever comes first. This seems like such a basic problem that I'm quite sure there must be a (...) (20 years ago, 29-Aug-04, to lugnet.robotics.rcx.robolab)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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