To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 6588
6587  |  6589
Subject: 
Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
Newsgroups: 
lugnet.robotics
Date: 
Fri, 27 Aug 1999 13:21:27 GMT
Viewed: 
1012 times
  
In lugnet.robotics, Kekoa Proudfoot writes:
I don't doubt that there are reasonable creations that e.g. press a touch
sensor button halfway for extended periods of time, but I can't think of
any off the top of my head.  Can anybody help me out here? • (snip)
-Kekoa

I managed to use this touch sensor "feature" as sort of a poor man's bend
sensor to improve my wall-following robot. It's a torbot-type design with a
left and right feeler-type bumpers in front.
Using NQC (thanks, Dave) I set the sensor type to SWITCH and the mode to RAW.
After some experimentation, any raw value greater than 1000 I called an open
switch, and any value less than 100 I called a fully closed switch. By turning
right when the value was less than 100, going straight between 100 and 1000 and
turning right when greater than 1000, the robot kept its left feeler against
the wall. Displaying the sensor value while the robot was running showed it
spent most of the time between 101 and 110. (Once against the wall, I never saw
it dip below 100, but it did noticably veer right every so often.)

The NQC code for following the wall is something like this (I don't have the
code or NQC with me to test this):

// IN_1 is the left feeler/bumper.
// OUT_A is the left motor, OUT_C is the right motor
SensorType(IN_1, SWITCH);
SensorMode(IN_1, RAW);
Display(1);
while true {
   if (IN_1 < 100) {
      Fwd(OUT_A, 8);
      Float(OUT_C);
   } else {
      if (IN_1 > 1000) {
         Float(OUT_A, 8);
         Fwd(OUT_C, 8);
      } else {
         Fwd(OUT_A, 8);
         Fwd(OUT_C, 8);
      }
   }
}

This code works well when the 'bot starts out against the wall. I'm still
working on the next part--having it acquire the wall in the first place. It
either plows into it or bounces off it on initial contact. Any suggestions?



Message has 2 Replies:
  Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
 
Some corrections to my last post: (...) should be: turning LEFT when greater than 1000, the robot kept its left feeler against (...) should be: spent most of the time between 101 and 110. (Once TRACKING the wall, I never *saw* (...) should be: (...) (25 years ago, 27-Aug-99, to lugnet.robotics)
  Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
 
(...) I gather the lever arms of the feelers gave you enough control over the touch sensor to stay mostly in the 100 to 110 range? It would seem to be difficult to keep the touch sensor in that position for long periods of time, since the sensor is (...) (25 years ago, 28-Aug-99, to lugnet.robotics)

Message is in Reply To:
  Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
 
(...) I don't doubt that there are reasonable creations that e.g. press a touch sensor button halfway for extended periods of time, but I can't think of any off the top of my head. Can anybody help me out here? My point was that in what I would (...) (25 years ago, 26-Aug-99, to lugnet.robotics)

22 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
    

Custom Search

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