Three motors are defined, wheelL, wheelR
and claw.
A group, wheels, is defined to
group wheelL and wheelR :
wheels.speed = 10;
is equivalent to
wheelL.speed = 10 & wheelR.speed = 10;
The attribute .speed allows you to set the current
speed of the motor. This value is set between -100 and 100.
Motor position (in degrees) can be accessed using
the .val attribute. This attribute is set to 0 when
you turn the robot on.
We have added a PID control, so you can set a position :
claw.val = 360 ;
requests a full rotation of the claw motor.
The PID parameters claw.PGain, claw.IGain, claw.DGain and claw.Precision can be set to change the PID behavior.