Subject:
|
Re: Reading sensors at equal intervals.
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sun, 25 Apr 1999 01:07:14 GMT
|
Viewed:
|
1326 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:
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 (...) (26 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
|
|
|
Active threads in Robotics
|
|
|
|