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:

Wolfram Research (2014), DeviceConfigure, Wolfram Language function, https://reference.wolfram.com/language/ref/DeviceConfigure.html.

Text

Wolfram Research (2014), DeviceConfigure, Wolfram Language function, https://reference.wolfram.com/language/ref/DeviceConfigure.html.

CMS

Wolfram Language. 2014. "DeviceConfigure." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DeviceConfigure.html.

APA

Wolfram Language. (2014). DeviceConfigure. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeviceConfigure.html

BibTeX

@misc{reference.wolfram_2024_deviceconfigure, author="Wolfram Research", title="{DeviceConfigure}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DeviceConfigure.html}", note=[Accessed: 12-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_deviceconfigure, organization={Wolfram Research}, title={DeviceConfigure}, year={2014}, url={https://reference.wolfram.com/language/ref/DeviceConfigure.html}, note=[Accessed: 12-October-2024 ]}