fills the buffer on a device with the values vals.


fills the buffer associated with the parameter param with the values vals.


fills the buffers associated with the parami with the corresponding values valsi .


  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • DeviceWriteBuffer is a blocking function; when called, it communicates with the device and does not return until it has finished writing data.
  • DeviceWriteBuffer[device,vals] returns vals, even if for some reason the write operation fails.


open allclose all

Basic Examples  (2)

Write a list of strings to the buffer of a demo device and retrieve the result:

Close the device:

Write a list of values to the buffer associated with a specified parameter:

Read the buffer to verify successful writing:

Applications  (2)

Open a serial connection to an Arduino running a custom program called sketch:

Write a string to the device buffer to light up an LED connected to the Arduino board:

Write a sequence of bytes to temporarily put a Sphero robotic ball in the sleep mode:

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


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


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


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


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


@online{reference.wolfram_2024_devicewritebuffer, organization={Wolfram Research}, title={DeviceWriteBuffer}, year={2014}, url={}, note=[Accessed: 12-July-2024 ]}