Re: [WheelCommander] Wheel Commander



Hank,

Glad it works for you.  Nice job.

You might be able to reduce the hesitation by changing your code a bit.  The serial link between the BasicStamp and the WheelCommander is slow, due to limitations in the BasicStamp itself. 

So, you should only send updates to velocity when the velocity command needs to change value; if it is always 30, then you only need to send it once after each time you stop the robot.  Further, you only need to send the set rotation rate to the WheelCommander when its value changes.

If the value of the velocity and/or rotation rate does not change for a while, your program is wasting time and bandwidth of the serial link repeating itself; just send them when the change and then send a Go to make them take effect.  Only send them when they change values.

-Pete

Hank van Buuren wrote:

loop4:
rotation = 0
GOSUB setrotationrate
velocity = 30
GOSUB setvelocity
GOSUB go
 
enter:
DEBUGIN SDEC rotation
GOSUB setrotationrate
velocity = 30
GOSUB setvelocity
GOSUB go
GOTO enter
 
END
 
Pete,
I have replaced loop4 on your wc132_bs_2 demo with this part program.
It does exactly what I wanted it to do and it is perfect for our job.
 
I have noted one discrepancy in my program, when changing the sign on
rotation (changing from Left to right control) there is a a hesitation before
the change in wheel speed takes effect. It is almost like it has to clear before
it takes effect.
Hank




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.