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 / 5044
5043  |  5045
Subject: 
Re: Light sensor help??Newbie!!!
Newsgroups: 
lugnet.robotics
Date: 
Thu, 13 May 1999 01:14:45 GMT
Viewed: 
1066 times
  
In lugnet.robotics, Bill Leggett writes:

But anyway, the manual states and I quote" trigger the stack when the
FIRST of TWO consecutive readings falls outside a chosen interval AND
the second reading falls within a chosen interval."

This is how the Sensor Watcher works.  The stack of code that hangs below a
Sensor Watcher is only executed once when the reading becomes true.  As long
as the condition stays true it won't do anything which is probably not what
you want.

What you need is a Check and Choose Stack Controller to monitor the light
sensor.  You have to stick it in a My Command with the necessary true false
code and then put the My Command in a Repeat Forever loop.  This is the only
way to nest loops, and you can only do it one deep.

The Sensor Watcher is a good way to handle the bump conditon using a Touch
sensor and it sounds like it is working for you.

Hope this helps.



Message is in Reply To:
  Light sensor help??Newbie!!!
 
Hi All! I have a problem with the light sensor using the included software. (Don't groan all you advanced programmers, please ;-> ) But anyway, the manual states and I quote" trigger the stack when the FIRST of TWO consecutive readings falls outside (...) (25 years ago, 12-May-99, to lugnet.robotics)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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