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 / 4689
  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)
 
  Re: Reading sensors at equal intervals.
 
(...) 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 (...) (25 years ago, 25-Apr-99, to lugnet.robotics)
 
  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)
 
  Re: Reading sensors at equal intervals.
 
(...) You are right, the timer values as seen by the firmware are in 1/10ths of a second. I lost myself in H8-land, which has a 1 ms timer that gets divided down before being seen by the firmware. -Kekoa (25 years ago, 25-Apr-99, to lugnet.robotics)
 
  Re: Reading sensors at equal intervals.
 
(...) <snip> (...) That looks like a "no" then... How does the timing of tasks work? I seem to recall reading somewhere that the firmware executes the tasks in sequence - is there any timing element to this, or does it just do task 1, then (...) (25 years ago, 26-Apr-99, to lugnet.robotics)
 
  Re: Reading sensors at equal intervals.
 
(...) IIRC, it preferentially executes a single instruction received from the IR connection, otherwise takes the next instruction from the next task and executes that instead. (...) Probably. I don't think LegOS supports (what I'd call) a software (...) (25 years ago, 26-Apr-99, to lugnet.robotics)

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