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 / 3043
3042  |  3044
Subject: 
Re: BrickOS Threading...
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 16 Dec 2002 21:54:14 GMT
Viewed: 
2961 times
  
I downloaded the Legway stuff and have been having fun. I did
have to do some tuning since I bought one of the proximity sensors instead
of the EOPD (they didn't have it yet.) I have been trying to understand
your code and found the motor driver code interesting. You obviously
bounced off the same problem we all find namely that setting the power
level doesn't give useful control over robot speed.

It looks like you have implemented your own version of PWM and the question
is why does it work better than the BrickOS PWM (which more or less copies
the RCX PWM?) I can see two areas of possible difference. The first is that
your period is different from the default. Your period comes from (sys_time
& 7) which is an 8 msec period. The other difference is that you switch
between motor on and motor in brake mode (whatever that is.)

To tell you the truth, I'm not exactly sure how the BrickOS PWM works, but
I do know the standard RCX PWM simply switches the motors between ON and
FLOAT, which will not slow the motor down, when it switches from a high power,
to a lower power.  My code switches between ON and BRAKE.

If you don't know the difference between Float and Brake, first take a motor,
and spin it with your fingers.  Then, connect one end of a wire to the motor,
and loop the other end back and put it on the first connector, so the wire
goes out the same side on BOTH connectors.  Then, try turning the motor again.
You'll notice it's MUCH harder to turn.  (if not, try turning the second wire
connector)

I think the work you are doing could be generalized and possibly folded
back into BrickOS as a special mode of the motor driver.

I like my motor driver, because it only requires 1 parameter to set the
speed & direction.  But that doesn't mean anyone else will like it...

Steve

--
_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free!
http://www.net2phone.com/cgi-bin/link.cgi?143



1 Message 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