Programmatically synchronizing two motors
Posted: 18 Oct 2010, 18:11
Hi everybody,
nice to find a substitute to the old NXTasy forum (where I was named Enciladus).
I am currently working on a LEGO Mindstorms project and I am programming the robots using nxtOSEK and Eclipse. I have to use a language that supports classes. As I have noticed so far, there is no function implemented, that enables to servos to drive synchronized like the OnFwdSync method in NXC. I need this, because the variation of the motors from each other is getting to big.
Could you give me some suggestions perhaps? I have tried to read out the tacho count and adjust the speed of the slow motor manually, but therefore I have to know what distance the robot drove, which is rather difficult to know, since the robot drives on different surfaces.
I think one good way would be to read out the currently applied voltage of the servo and adjust them, but I can't see a way with the ECRobot API which nxtOSEK uses.
I would be glad for any suggestions you guys might have.
Greetings, Alex
nice to find a substitute to the old NXTasy forum (where I was named Enciladus).
I am currently working on a LEGO Mindstorms project and I am programming the robots using nxtOSEK and Eclipse. I have to use a language that supports classes. As I have noticed so far, there is no function implemented, that enables to servos to drive synchronized like the OnFwdSync method in NXC. I need this, because the variation of the motors from each other is getting to big.
Could you give me some suggestions perhaps? I have tried to read out the tacho count and adjust the speed of the slow motor manually, but therefore I have to know what distance the robot drove, which is rather difficult to know, since the robot drives on different surfaces.
I think one good way would be to read out the currently applied voltage of the servo and adjust them, but I can't see a way with the ECRobot API which nxtOSEK uses.
I would be glad for any suggestions you guys might have.
Greetings, Alex