Subject:
|
Re: time sampling under the rcx standard OS
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Wed, 21 Sep 2005 16:49:43 GMT
|
Viewed:
|
6077 times
|
| |
| |
Hi Steve,
As I'm quite new to BrickOS and to C programming, I'm sorry I'm not sure I
understood what you meant, neither how you do this :
> Well, in BrickOS, my loops usually execute at
> 1kHz, so I usually just set
> it to check the sensor, and set the motor every 1ms. So it just keeps
> checking the clock.
- Do you check the sensor at a higher rate, and only send a command to the motor
at 1kHz ?
- How do you get this command to be looping at 1kHz (I do not know yet how time
is managed within BrickOS) ?
- Is it better to run two tasks independently, one for sensor checking, and one
for motor command sending ?
Maybe you'd have a sample to show how you proces this ?
Thanks, best regards,
Francois
|
|
Message has 1 Reply: | | Re: time sampling under the rcx standard OS
|
| (...) Here's a code byte from my LegWay code. ---- int MotorSpeedArray[32] = {1,3,2,0}; // Speeds // ... later in the program... if (sys_time>CheckTime) // check system timer - is it time to check sensors again? { L1 = ReadSensor(SENSOR_1); L3 = (...) (19 years ago, 21-Sep-05, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | Re: time sampling under the rcx standard OS
|
| (...) Well, in BrickOS, my loops usually execute at > 1kHz, so I usually just set it to check the sensor, and set the motor every 1ms. So it just keeps checking the clock. (...) Yes. There's an option that lets you download an "SREC" type of file. I (...) (19 years ago, 19-Sep-05, to lugnet.robotics.rcx.nqc)
|
10 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
|
|
|
|