To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 41
40  |  42
Subject: 
Re: Light sensor initialization?
Newsgroups: 
lugnet.robotics.rcx
Date: 
Thu, 15 Jul 1999 14:42:17 GMT
Reply-To: 
mattdm@mattdm.org^StopSpam^
Viewed: 
1888 times
  
Jonathan Knudsen <jonathan@oreilly.com> wrote:
Matthew's program takes one reading at initialization time to
determine a baseline value. Any reading that falls 7 units
below this is assumed to be a dark line.
I take a somewhat more conservative approach, taking 10

Wow. I feel I should point out that experimentally my method works 100% of
the time. :)

On the other hand, mine is a special-case application: the light sensor is
used to read color values from a surface, which presumably will have very
little variation. If you're looking to get ambient light level in a room,
for example, the more complicated code is probably justified.


1. You might want to run your robot at different times of day and have it
  work right. Hardcoded values will probably fail you here.
2. Different light sensors produce different readings for the same amount
  of light. Doing a runtime calibration increases the chances that your
  program can work on someone else's robot.

3. You sometimes run your robots on nice white paper, and sometimes you have
brown packing paper. :)


--
Matthew Miller                      --->                  mattdm@mattdm.org
Quotes 'R' Us                       --->             http://quotes-r-us.org/



Message is in Reply To:
  Re: Light sensor initialization?
 
Matthew's program takes one reading at initialization time to determine a baseline value. Any reading that falls 7 units below this is assumed to be a dark line. I take a somewhat more conservative approach, taking 10 readings over one second and (...) (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)

10 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