Page 2 of 2

Re: NXC - motors synchronization

Posted: 15 Feb 2012, 16:16
by psorek
I didn't have many time for trying this since last post, but now i am sure I know how. Thanks for help!

Re: NXC - motors synchronization

Posted: 17 Feb 2012, 20:14
by psorek
Yeah, it works!
I have next question: How to make motors stop more smoothly, but with using RotateMotor() function? I don't want OnFwd() and Float ().

i am not sure, but it can be something with PID what is it and how works?

Re: NXC - motors synchronization

Posted: 18 Feb 2012, 03:26
by afanofosc
There are many options and there have been many threads on these forums about exactly how to move motors. A standard API function may not exactly suit your needs. I think I posted a custom routine here in another thread that included ramp up and ramp down support but otherwise acted a lot like RotateMotor. It might work well for you. You could use the PID version of RotateMotor to see if adjusting the P, I, and D values make the routine stop more smoothly. Of course, a lower power level will make it stop more smoothly as well. That's one reason why trying the custom routine I posted that supports ramping up and ramping down might work for you also, since it ramps down 0 power as it reaches the target angle.

You'll need to just experiment with PID values and other motor control routines to see what works best - or roll your own.

John Hansen