Command

Command allows you to use expert commands. The Command UObject contains the following methodes:

Table A.8. Command's methodes:

NameDescription
send(buffer)

Sends a command without requiering any answer.

buffer must be a list of integers between 0 and 255.

Example:

Command.send([3,10,10,0,0]);

that plays a beep.

request(bufferIn, sizeOut)

Sends a command requiering an answer, and returns the buffer out. This is only recommanded to expert users. Beware of the sizeOut parameter. Indeed if it is too long, the request will normaly fail and when the size is too short, the command may work but all mindstorms internal buffers will be shift back (so this will bend all other requests).

bufferIn is the buffer of the command.

sizeOut is the size of the answer.

Example:

answer = Command.request([7,0], 15); 

that returns the informations on input port 0.