To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1195
1194  |  1196
Subject: 
Re: rotation sensor problem, again...
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 3 Jul 2000 10:39:42 GMT
Viewed: 
1195 times
  
I had the same problem and I solved it with a msleep(50). msleep(10) is not
enough.

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




Message is in Reply To:
  rotation sensor problem, again...
 
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 (...) (24 years ago, 14-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
    

Custom Search

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