executes the specified command on a device.


executes the command with the parameters params.


  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • DeviceExecute is a blocking function; when called, it communicates with the device and does not return until it has the data it needs.
  • The parameters params can be given either as a list of raw parameters or as an association or list of rules giving names and values of parameters.
  • DeviceExecute returns a Wolfram Language version of the result of executing the specified command on the device.


open allclose all

Basic Examples  (2)

Open a demo device and execute a command on it:

Specify a device class to execute the same command:

Execute a command with a specified parameter:

Applications  (2)

Open a weather station and write a string to its LCD screen:

Use DeviceExecute to clear the screen:

Write a string of bytes to a Sphero serial device and use DeviceExecute to check if a response is available:

Flush the buffered data and check that the buffer is empty:

Wolfram Research (2014), DeviceExecute, Wolfram Language function,


Wolfram Research (2014), DeviceExecute, Wolfram Language function,


Wolfram Language. 2014. "DeviceExecute." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2014). DeviceExecute. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_deviceexecute, author="Wolfram Research", title="{DeviceExecute}", year="2014", howpublished="\url{}", note=[Accessed: 24-July-2024 ]}


@online{reference.wolfram_2024_deviceexecute, organization={Wolfram Research}, title={DeviceExecute}, year={2014}, url={}, note=[Accessed: 24-July-2024 ]}