|
On Fri, 28 May 1999, Luis Villa wrote:
> 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-
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 ambient light running it in passive mode, but you are
using it for something it wasn't designed for and you would certainly have
to calibrate your results.
John A. Tamplin Traveller Information Services
jat@LiveOnTheNet.COM 2104 West Ferry Way
256/705-7007 - FAX 256/705-7100 Huntsville, AL 35801
|
|
Message has 1 Reply: | | Re: light values?
|
| Ah... that makes sense- I didn't realize that power was completely cut. Should have (I'm not *that* incompetent in reading electronics diagrams). Oh well. Thanks for the feedback, John... Luis (...) ###...### God was my co-pilot, but we crashed in (...) (25 years ago, 28-May-99, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Re: light values?
|
| 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 (...) (25 years ago, 28-May-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
|
|
|
|