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 / 6589
6588  |  6590
Subject: 
Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
Newsgroups: 
lugnet.robotics
Date: 
Fri, 27 Aug 1999 15:21:30 GMT
Original-From: 
Brian B. Alano <(alano@kiva.net)SayNoToSpam()>
Viewed: 
891 times
  
Some corrections to my last post:

"Brian B. Alano" wrote:

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

should be: turning LEFT 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

should be: spent most of the time between 101 and 110. (Once TRACKING 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);

  should be:       Float(OUT_A);


         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?
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message is in Reply To:
  Re: multiplexed touch sensors [was: Re ideas for a RIS 2.0]
 
(...) (snip) (...) 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 (...) (25 years ago, 27-Aug-99, to lugnet.robotics)

22 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