DeviceReadTimeSeries

DeviceReadTimeSeries[device,{t,dt}]

repeatedly reads default items from the specified device at interval dt for a total time t, returning a time series of the resulting values.

DeviceReadTimeSeries[device,{t,dt},param]

repeatedly reads the parameter param and returns a time series of its values.

DeviceReadTimeSeries[device,{t,dt},{param1,param2,}]

repeatedly reads the parami and returns a time series of their values.

Details

  • The time parameters dt and t can be Quantity objects containing units. If they are given as pure numbers, they are assumed to be in units of seconds.
  • DeviceReadTimeSeries is a blocking function that does not return until it has collected data for time t.
  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • A component of a TimeSeries object ts corresponding to parami can be obtained from ts["PathComponent",i].
  • For string parameters, a component can typically be obtained from ts["parami"].

Examples

open allclose all

Basic Examples  (2)

Open a demo device:

Capture a three-second time series at 0.1-second intervals:

Plot the time series:

Repeatedly read a list of parameters from a device and plot the resulting time series:

Plot a time series for the given parameter:

Applications  (1)

Generate a time series by reading illuminance data from a TinkerForge Weather Station every 0.1 second for five seconds while continuously changing the device orientation:

Extract the measured values of the illuminance:

Plot the illuminance values:

Properties & Relations  (2)

For a list of parameters, TimeSeries components can be accessed by their names:

Collect a time series from a device and perform some analysis:

Plot the interpolated path function of the time series:

Rescale the time series to run from 0 to 10:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2023_devicereadtimeseries, organization={Wolfram Research}, title={DeviceReadTimeSeries}, year={2014}, url={https://reference.wolfram.com/language/ref/DeviceReadTimeSeries.html}, note=[Accessed: 19-March-2024 ]}