To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 207
206  |  208
Subject: 
Re: light values?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 28 May 1999 18:24:17 GMT
Viewed: 
1172 times
  
Some months ago, I posted this question, but got no response. I've finally
played with it some more this morning and have some observations:

1) After setting ds_active, my light sensor returns values of 0-100, as I
should.
2) After calling ds_passive, I get values in the range 219-280.
3)"Initializing" the driver by calling ds_passive and then ds_active gives me
good values for active mode, so it is not a cumulative problem. (i.e., it's
passive specific and does not carry over.)

Frankly, I'm not sure if this is a problem in LegOS or just a result of the
values returned by the sensor itself. (I'm guessing that is the case.) *Should*
I be getting the same scaling(0-100)? As far as I can tell from the code, I
should, since the same operations are performed on the raw values. Again, as
far as I can tell, the raw values should be in the same absolute range,
dictated by the hardware. However, I'm no hardware or assembly expert, and the
only differences in the code between active and passive are in assembly (lines
199 and on, direct-sensor.c), so I feel a little lost.

Basically, what I want to know is, is there some  difference in the code that
is causing my wildly diverging values? Or is it just a hardware issue I should
hack around? Any help will be greatly appreciated-
Luis


In lugnet.robotics.rcx.legos, Luis Villa writes:
Another question before I call it a night- under LegOS 0.1.6, light-sensor
values were restricted to the range 0-100. Under 0.1.7, I'm now getting a
max value (pointed straight at a light bulb) of about 263, or once even
272. 255 would make sense to me, but 272 seems odd. Similarly, in passive
mode, the lowest reading I can get is roughly 220, even when pressed
against an opaque, unreflective, black surface.  Am I doing something
wrong, or is this an 0.1.7 bug or a feature?
Thanks,
Luis

#######################################################################

"They call the faithful to their knees
to hear the softly spoken magic spell:"

"There's no place like home...
There's no place like home...
There's no place like home."

-Pink Floyd, Dark Side of the Moon
-Dorothy, The Wizard of Oz

#######################################################################



Message has 1 Reply:
  Re: light values?
 
(...) The light sensor is an active sensor, which means that it requires power to operate. When you call ds_passive, you are no longer supplying power to the sensor between readings. Some people have reported being able to use the light sensor for (...) (25 years ago, 28-May-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  light values?
 
Another question before I call it a night- under LegOS 0.1.6, light-sensor values were restricted to the range 0-100. Under 0.1.7, I'm now getting a max value (pointed straight at a light bulb) of about 263, or once even 272. 255 would make sense to (...) (25 years ago, 12-Apr-99, to lugnet.robotics.rcx.legos)

4 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
    

Custom Search

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