With this code
#include "NXCDefs.h"
task main()
{
PlayTone(800,300);
Wait(200);
RotateMotorEx(OUT_AC, 50, 360, 0, true);
Off(OUT_AC);
Wait(1000);
RotateMotorEx(OUT_AC, 50, 360, 100, true);
Off(OUT_AC);
Wait(1000);
RotateMotorEx(OUT_AC, 50, 360, -100, true);
Off(OUT_AC);
Wait(1000);
}
I have two problems. The first one is:
if the flag of the function RotateMotorEx is set to FALSE the motors go
forward ignoring 'turnpct' paramenter.
The second problem is the following. I built a little robot with two
wheels and I write a little point on the wheels. With the instruction
RotateMotorEx(OUT_AC, 50, 360, 0, true);
I have no problem: the wheels perform a 360 degree rotation
With the other instruction the wheel that move backward performs (it
seem to me) a rotation of 360-22.5 degree...
When the robots started to move on the floor of my house I noticed
another problem: with the instruction
RotateMotorEx(OUT_AC, 50, 360, 100, true);
the robot perform a rotation of 180 degree, with the instruction
RotateMotorEx(OUT_AC, 50, 360, -100, true);
the robot perform a rotation of 270 degree (rotating in the other
direction, this is correct).
The configuration of the robot is similar to the simplest one, if you
want I can send you a photo of the robot.
Thanks in advance. Please contact me if my explanation are not good. (thinkmarco@yahoo.it)