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 / 1251
1250  |  1252
Subject: 
Re: SPIRIT SetSensorMode "slope" parameter
Newsgroups: 
lugnet.robotics
Date: 
Wed, 9 Dec 1998 18:50:59 GMT
Viewed: 
897 times
  
Dr. Bob Miller <74471.3622@compuserve.com> wrote:
One particular parameter of the SetSensorMode command is somewhat obscure:
the "Slope" parameter.  The Lego SDK doesn't explain this very well in my
view, and I haven't been able to get it to do anything particularly useful
yet.  I' posting this message to see if anyone here has a good explanation
of how this parameter is supposed to work, and how you are supposed to use
it.

The SDK says that Slope pertains to Boolean mode only.  If you set
Slope=0, Boolean mode acts in the normal way, like the Touch sensor:
1=(RAW<45%of1023), 0=(RAW>55%of1023).  If you set Slope to a value in
range of 1..31, the SDK implies that this value of slope is the increment
needed to get a change in the Boolean state.  I sort of expected that if
you set Slope=10, then a change of 10 in the value of RAW would change
Boolean from a 1 to a 0 or a 0 to a 1.  However, I don't actually see
behavior like that.

It sounds like you understand the general idea of how the slope parameter
works, although I don't think that a slope of 10 implies that the
transition happens when the raw value changes by 10.  For slopes in 1..31,
I believe the raw value change required for a transition is simply
proportional to the slope, not equal to the slope.

I have yet to dig up the exact formula.

Anyways, my documentation for the slope value is at:

http://graphics.stanford.edu/~kekoa/rcx/opcodes.html#set_sensor_mode

-Kekoa



Message is in Reply To:
  SPIRIT SetSensorMode "slope" parameter
 
Hi all- I've been writing an article about programming the RCX using Delphi and the SPIRIT OCX, to appear in MicroComputer Journal Magazine in my Delphi in the Laboratory series. I've written an example program, to be published with source code, (...) (26 years ago, 9-Dec-98, to lugnet.robotics)

6 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
1 hour ago
Custom Search

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