Send motor settings to the NXT brick
OBJ.SendToNXT sends the motor settings in OBJ to the NXT brick.
OBJ.SendToNXT(HANDLE) uses HANDLE to identifiy the connection to use for this command. This is optional. Otherwise the defaul handle (set using COM_SetDefaultNXT) will be used.
For a valid list of properties and how they affect the motors' behaviour, see the documentation for the class constructor NXTMotor.
With ActionAtTachoLimit = 'Coast' and synchronous driving (two motors), the motors will stay synced after movement (even after .WaitFor() has finished). This is by design. To disable the synchonization, just use .Stop.
If you send a command to the NXT without waiting for the previous motor operation to have finished, the command will be dropped (the NXT indicates this with a high and low beep tone). Use the motor-objects method .WaitFor to make sure the motor is ready for new commands, or stop the motor(s) using .Stop.
motor = NXTMotor('A', 'Power', 50, 'TachoLimit', 200); motor.SendToNXT(); motor.WaitFor(); NXT_PlayTone(400,500);
- Author: Linus Atorf, Aulis Telle, Alexander Behrens (see AUTHORS)
- Date: 2009/07/12
- Copyright: 2007-2009, RWTH Aachen University