Subject:
|
Re: Use the EVENT_LIGHT_CLICK on Scout
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 13 Oct 2000 16:48:57 GMT
|
Viewed:
|
771 times
|
| |
 | |
Camus Lai wrote:
> Help! I want to use NQC 2.2r1 to program the scout the monitor the flash
> light reflect from some obstacle. I use the VLL as the light source. Here
> is the source.
>
> task main()
> {
> On(OUT_C);
> SetSensorClickTime(100);
> monitor(EVENT_LIGHT_CLICK)
> {
> }
> catch
> {
> PlaySound(SOUND_DOUBLE_BEEP);
> }
> until(false);
> }
>
> I download the above program to the scout and run the program. After
> this, what I can see is just the flashing red light from the front. Even I put
> something in front of the scout, there are no beep sound.
>
> Can't anyone tell me what am I doing wrong, please.
My guess would be it's no where near bright enough to register. It's looking for a
SUDDEN change from dark to LIGHT and back to dark...
You'd be better off using the IR to trigger that. In the Scout SDK there is a
avoidance program. Maybe you can steal it's codes? I've tried it and it did
work... It really ate batteries though..
Dean
--
Coin-Op's For Sale!: http://www.akasa.bc.ca/tfm/coin-op.html
Dean's Lego Workshop: http://www.akasa.bc.ca/tfm/lego_wr.html
Vancouver Lego Club: http://www.akasa.bc.ca/vlc
|
|
Message is in Reply To:
 | | Use the EVENT_LIGHT_CLICK on Scout
|
| Help! I want to use NQC 2.2r1 to program the scout the monitor the flash light reflect from some obstacle. I use the VLL as the light source. Here is the source. task main() { On(OUT_C); SetSensorClickTime(100); monitor(EVENT_LIGHT_CLICK) (...) (24 years ago, 13-Oct-00, to lugnet.robotics)
|
2 Messages in This Thread:   
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|