Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Using Connected Devices

The Wolfram Language provides a streamlined framework for connecting to external devices. Many classes of devices listed in the Wolfram Connected Devices Project are immediately supported within the Wolfram Language.


Setting Up Devices & Connections

DeviceOpen open a connection to a device

DeviceObject representation of a connected device

DeviceConfigure  ▪  DeviceClose  ▪  Devices

FindDevices attempt to find devices available on a particular machine

device[param] the value of a parameter for a device, often settable with (Set)

Device Types

"Serial" generic RS-232/RS-422 serial protocol

"GPIO" general-purpose digital I/O directly from pins

"Arduino" Arduino analog and digital I/O and autonomous code execution

"Camera", "RaspiCam", ... cameras for capturing images

Reading Unbuffered Data

DeviceRead ask to read one item of data from a device, waiting until it is done

DeviceReadList repeatedly read items of data a specified number of times

DeviceReadTimeSeries read data at specified times, and construct a time series

Reading Buffered Data

DeviceReadLatest read the most recently buffered piece of data from the device

DeviceReadBuffer read the entire contents of the buffer on the device

Writing Unbuffered & Buffered Data

DeviceWrite write a value or list of values to a device

DeviceWriteBuffer write data to fill the buffer on a device

Executing Commands

DeviceExecute execute a command on a device

DeviceExecuteAsynchronous initiate an asynchronous command

Stream Interfaces for Devices

DeviceStreams get streams associated with a device

BinaryRead  ▪  BinaryWrite  ▪  Read  ▪  Write  ▪  Import  ▪  Export

Asynchronous & Scheduled Operations

DeviceExecuteAsynchronous initiate an asynchronous command

AsynchronousTaskObject  ▪  StopAsynchronousTask

RunScheduledTask periodically perform an action

Images & Audio

ImageCapture  ▪  CurrentImage

File & API Connections

Import  ▪  URLFetch  ▪  URLFetchAsynchronous  ▪  ServiceExecute

Wolfram Data Drop

Databin  ▪  CreateDatabin  ▪  DatabinAdd