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 / 2676
2675  |  2677
Subject: 
Light Sensor Problem
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 27 Jun 2002 03:04:34 GMT
Viewed: 
2313 times
  
Hello,
         I have been trying out the demo programs in legOS.

all demos worked fine except linetrack.c. When I download linetrack.lx
in the RCX (RCX2.0) and put it on the test pad that comes with mind storm
the bot goes srtaight. It does not recognize dark or light threshhold and
does not track the line..

The light sensor is fine because it works with the orignal mindstorm
software
and I ran a demo linetrack program from NQC which worked fine.


I have tried playing with the threshold values in linetrack.c

DARK_THRESHOLD
BRIGHT_THRESHOLD

but no luck I substituted the following defines

LIGHT_RAW_BLACK  for DARK_THRESHOLD
and
LIGHT_RAW_WHITE for BRIGHT_THRESHOLD

but no luck . I have tried assigning different senor port to the light
sensor

in linetrack.c it is on SENSOR_2 I tried SENSOR_1 and SENSOR_3

but didn't work. The sensor is ok since it works with NQC and the mindstorm
software.
I can't figure out what the problem might be. The red light on the sensor
comes on
so which means that legOS is activating it but for what ever reason the bot
does not track
the line.

The touch sensors are working fine so I suppose the event handler is hadling
the
wakeup functions.

If somone can make out any thing from this descrpition and point out the
problem
I'll be grateful.

Best Regards

Shehryar Shaheen



Message has 1 Reply:
  Re: Light Sensor Problem
 
I had similar problems, so I added a bit of code to display the light sensor value on the LCD. I then placed the bot on the test pad and observed the various numbers as it crossed from white to green and black. I then updated the linetrack.c with (...) (22 years ago, 29-Jun-02, to lugnet.robotics.rcx.legos)

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