Subject:
|
Re: SPIRIT SetSensorMode "slope" parameter
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 9 Dec 1998 16:30:40 GMT
|
Original-From:
|
Laurentino Martins <lmartins@marktest=AvoidSpam=.pt>
|
Viewed:
|
989 times
|
| |
| |
I'm sure that the best persons to decode the use of that function are the guys that disassembled the firmware...
Laurentino Martins
[lau@mail.telepac.pt]
[http://www.terravista.pt/Enseada/2808/]
--//--
At 15:47 09-12-1998 Wednesday , you wrote:
> 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, which I call RCXplore. I wrote this program to make it as easy
> as possible to set and measure the electrical interfaces to outputs and
> sensors. The program mostly sends immediate commands and reads values from
> the RCX, so it's sort of like a souped-up version of the MindStorms test
> panel.
>
> In particular, the program is designed to make it very easy to set different
> sensor types and modes, so I could measure the effects of some of the more
> obscure parameters of the SetSensorMode command, measure calibration curves
> for temperature sensors, measure electrical waveforms and output impedances of
> the sensor and motor interfaces, etc.
>
> 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'm
> 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.
>
> I tried this with the sensor type set to Touch and with a pot connected to the
> sensor port, so I could change the input easily and continuously as needed.
> When I change the Slope parameter while polling the sensor value continuously,
> small values of Slope like 1 or 2 seem to cause the Boolean value to bounce
> between 0 and 1 with the pot unchanged, apparently due to the usual noise that
> you would see in RAW values. When I change the pot, I have to change it a lot
> to make the Boolean value change to a new steady value: the change I have to
> make is equivalent to the kind of change you would need if Slope were set to
> 0. Larger values of Slope, around 10, seem to make the Boolean value steady,
> but the overall behavior seems just like Slope=0.
>
> Anybody know what's going on here?
>
> Best regards,
>
> Dr. Bob
|
|
Message has 1 Reply: | | Re: SPIRIT SetSensorMode "slope" parameter
|
| (...) This is buried in the ROM, not the firmware. In particular, it is buried in 14c0, byte read_sensor (short code, sensorstruct *sensor). I didn't bother to decode this function in detail since most of its functionality can be inferred from the (...) (26 years ago, 9-Dec-98, to lugnet.robotics)
|
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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|