To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4692
4691  |  4693
Subject: 
Re: Reading sensors at equal intervals.
Newsgroups: 
lugnet.robotics
Date: 
Sun, 25 Apr 1999 01:07:14 GMT
Viewed: 
1209 times
  
S. Crawshaw <sc10003@eng.cam.ac.uk> wrote:
Is it possible (with the standard firmware) to read the RCX sensors
(actually, ideally, to run any old subroutine) at equal intervals, ie like
every 100ms or something? (I assume it must be, otherwise you couldn't
measure speed with the angle sensor, because you'd need to know the time
between sensor readings...)

By standard firmware, I assume you mean using the byte codes ala NQC or
something similar.  If you only want semi-precise timing, you can use the
wait opcode to delay for approximately 100 ms between sensor samples.  If
you want something more accurate, you can make use of a 1 ms timer to get a
better measurement of the actual delay incurred, or you can combine the
wait opcode with busy waiting on a timer to make the delay exactly 100 ms.

-Kekoa



Message has 1 Reply:
  Re: Reading sensors at equal intervals.
 
(...) I though that the four "Timer()" values read out in 100ms increments only. Is there a way to get a 1ms timer with NQC? thanks, DLC (25 years ago, 25-Apr-99, to lugnet.robotics)

Message is in Reply To:
  Reading sensors at equal intervals.
 
Is it possible (with the standard firmware) to read the RCX sensors (actually, ideally, to run any old subroutine) at equal intervals, ie like every 100ms or something? (I assume it must be, otherwise you couldn't measure speed with the angle (...) (25 years ago, 24-Apr-99, to lugnet.robotics)

25 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