Subject:
|
Re: How to user MONITOR command for watching TIMER in Spybotics
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 12 Jul 2003 16:48:35 GMT
|
Viewed:
|
5359 times
|
| |
| |
This program below shows how a timer event can be used.
Dave Baum
----
#define MY_EVENT 0
task main()
{
ClearTimer(0);
SetEvent(MY_EVENT, Timer(0), EVENT_TYPE_HIGH);
SetUpperLimit(MY_EVENT, 1000);
monitor(EVENT_MASK(MY_EVENT)) {
while(true) {
Wait(100);
PlaySound(SOUND_CLICK);
}
}
PlaySound(SOUND_UP);
}
In article <HHswKM.pE4@lugnet.com>,
"Liem Peng Hong" <liemph@nais.ne.jp> wrote:
> Dear Members,
>
> I managed to use NQC MONITOR command to watch TIMERs in my SCOUT using the
> predefined SCOUT events (EVENT_TIMER_0). However, I failed with my Spybotics
> and
> RCX 2.0.
>
> My question is how can I use the MONITOR command to watch TIMERs (or maybe
> COUNTERs) in my Spybotics and RCX. Concretely I'd like to do the following
> thing:
>
> 1. Clear TIMER(0).
> 2. Set TIMER(0) limit to 1000
> 2. SetEvent 0 to TIMER(0) over limit
> 3. Monitor MASK_EVENT(0) whether TIMER(0) over limit the preset value (1000).
>
> Thank you in advance.
>
> Liem PH.
|
|
Message has 1 Reply:
Message is in Reply To:
3 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
|
|
|
|