Subject:
|
rotation sensor problem, again...
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 14 Jun 2000 23:53:21 GMT
|
Viewed:
|
1226 times
|
| |
| |
Just when you thought it was all fixed. I use the following code:
ds_active(&SENSOR_2);
ds_rotation_on(&SENSOR_2);
ds_rotation_set(&SENSOR_2, 0);
to setup a rotation sensor. Immediately after calling ds_rotation_set(),
and /without moving the sensor/, the value read is not 0 (as it should be)
but 1. If I call ds_rotation_set(&SENSOR_2,2), then the code is
initialized not to 2, but to 3. Or, after downloading a new kernel, I get
the same behavior except with -1 or -2. There was a similar problem in the
old code that would occasionally initialize the rotation sensors to
whatever they were set to, plus 2. Anyone have any clues on why this is
happening? I knew the old code inside and out, but never could track down
the bug... is it going to be the same this time?
Luis
-----------------------------------------------------------------------
"Going to California with an aching in my heart.
Someone told me there's a girl out there
with love in her eyes and flowers in her hair."
-Led Zeppelin, "Going to California"
-----------------------------------------------------------------------
|
|
Message has 2 Replies: | | Re: rotation sensor problem, again...
|
| (...) That you see values -1, 2, and 1 sounds like the current state of the rotation sensor is not considered when when the sensor is reset, like it is reset to a state of 0 when it should be reset to the current state of the sensor, like 0, 1, 2, (...) (24 years ago, 15-Jun-00, to lugnet.robotics.rcx.legos)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|