To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 13
12  |  14
Subject: 
Re: Making Light Sensor Passive
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 25 Feb 1999 16:00:55 GMT
Viewed: 
2560 times
  
I'm not sure what you mean by "making light sensor passive".  The light
sensor, by design, requires power to work.  You can tell the RCX that the
light sensor is a passive sensor, but you don't get much range in readings
- the phototransistor in the sensor just doesn't respond well as a passive
sensor for the RCX.  You can still try using SensorType() and SensorMode()
to configure the sensor in different ways (try STYPE_SWITCH for type and
SMODE_RAW for mode).

If the goal is to determine the ambient light in a room, you can still use
the light sensor - it will detect incident light as well as light
reflected from its own LED.  Of course, the LED can cause a mis-read under
certain conditions.

If you want to build your own passive light sensor, it is pretty easy -
just attach leads to a CdS cell.  There isn't a predefined "config" for
this type of sensor in NQC, but you can still manually configure it with
SensorMode() and SensorType().  Set the SensorType() to STYPE_SWITCH -
that makes the RCX use an internal pullup on the sensor line.  Set the
SensorMode() to SMODE_RAW or SMODE_PERCENT depending on how you want to
use the value.  Raw readings are from 0 to 1023, percent are converted to
0-100.

Dave


In article <F7pq66.JyM@lugnet.com>, "Mike Moran" <mm@ee.ed.ac.uk> wrote:

I was wondering if anyone knew how to do this in NQC?

Thanks,

Mike

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Making Light Sensor Passive
 
I was wondering if anyone knew how to do this in NQC? Thanks, Mike (26 years ago, 25-Feb-99, to lugnet.robotics, lugnet.robotics.rcx.nqc)

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