DeviceConfigure

DeviceConfigure[device,config]

configures the specified device according to config.

Details

  • The configuration specification config is often a list of rules or an association of values.
  • DeviceConfigure typically changes device properties.
  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • DeviceConfigure can be called multiple times for a given device.
  • DeviceConfigure[device,config] returns config, even if for some reason the operation fails.

Examples

open allclose all

Basic Examples  (1)

Use DeviceConfigure to set the buffer length for a demo device:

Verify the setting:

Applications  (3)

Use DeviceConfigure to set the pin directions for a GPIO device (e.g. on Raspberry Pi):

Read the digital value on pin 17:

Set pin 4 to digital "High":

Capture a frame from the system camera:

Modify the default raster size using DeviceConfigure and read another frame with the new setting:

Open a connection to a weather station device and configure its barometer bricklet UID:

Read in the ambient pressure from the configured device:

Properties & Relations  (1)

DeviceConfigure can change properties of the device after it is open:

Introduced in 2014
 (10.0)