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 / 606
  touch sensors - two at a time ?
 
I'm trying to build a sensor apparatus at the front of my bot, and it works, mostly. It's made up as a pair of touch sensors. The idea being that if one is activated, it turns around slightly, to avoid the sensor, but if both are activated, we (...) (25 years ago, 29-Dec-99, to lugnet.robotics.rcx.legos)
 
  Re: touch sensors - two at a time ?
 
(...) If I understand your problem correctly, it has nothing to do with legOS specifically. Therefore, I will answer, even though I have no experience with legOS. The problem is, there is a very small amount of time where, while you're pushing on (...) (25 years ago, 29-Dec-99, to lugnet.robotics.rcx.legos)
 
  Re: touch sensors - two at a time ?
 
(...) It's not a race condition, strictly speaking. It's more of a data sampling error. If you run that it a tight loop you will test the sensors hundreds or thousands of times a second. In order to see a simultaneous press you'd have to hit them at (...) (25 years ago, 29-Dec-99, to lugnet.robotics.rcx.legos)
 
  Re: touch sensors - two at a time ?
 
(...) The problem you are having, is that the processor is much faster than a human being... The code will allways tend to see one sensor befor the other, because of the processors speed, unless you can hit them together to within a very few mSec. (...) (25 years ago, 29-Dec-99, to lugnet.robotics.rcx.legos)

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