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 / 36
  Light sensor initialization?
 
This should be an FAQ at this point, but I'm having trouble tracking down an answer in the LUGNET archives. I'd like my 'bot to measure ambient light levels, and make light/gray/dark decisions based on those levels. For instance, Dave Baum's line (...) (25 years ago, 13-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
I haven't done that yet. But if you're doing a line follower, I would suggest the following: 1. First, build the line follower in such a way that it can rotate in place and make the light sensor sweep out a circle on the ground as it rotates. 2. (...) (25 years ago, 13-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) [snip] (...) Yes -- check out my RoboTag program at (URL) RoboTag, the sensor is pointing at the ground, which is probably grey/brown/white, with black border lines. My program reads the light level at start, and assumes that it isn't on a (...) (25 years ago, 14-Jul-99, to lugnet.robotics.rcx)
 
  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)
 
  Re: Light sensor initialization?
 
(...) 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 (...) (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) This is my inspiration for adding on-the-fly init code, btw. RoboTag uses two seperate robots, and it turns out that my friend -- the source of the second mindstorms kit -- has a light sensor which reads about 10 "darker" than mine. (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) That's why I suggested a solution that works in all cases. It's not much harder than your solution either. (URL) Robert Munafo (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) going in a circle. (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) Huh? You mean, your robot doesn't work unless you point it in a certain direction before starting the program? That doesn't sound too robust. Okay, let's change the algorithm: (this is for a line tracker that follows "dark" lines and relies on (...) (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)
 
  Re: Light sensor initialization?
 
(...) Partly, I can think of cases where that might be ugly. But more importantly, I often want to set up a scenario so that two robots will bump into each other in a certain place. (For making movies, showing off to friends, etc.) Can't do that as (...) (25 years ago, 15-Jul-99, to lugnet.robotics.rcx)

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