DeviceRead

DeviceRead[devobj]

读取与所指定的 DeviceObject 对应的开放装置的单个缺省项.

DeviceRead["devclass"]

读取来自类 "devclass" 的默认设备.

DeviceRead[device,param]

读取来自指定设备的参数 param.

DeviceRead[device,{param1,param2,}]

读取来自指定设备的参数列表 parami.

更多信息

  • DeviceRead 是一个阻断函数;它在被调用时与设备进行通信,但直到有它需要的数据时才返回.

范例

打开所有单元关闭所有单元

基本范例  (2)

打开一个演示设备,并从中读取:

读取特定参数:

"RandomSignalDemo" 类别的设备读取参数:

读取参数列表:

应用  (3)

从默认摄像头读取单帧:

关闭到摄像头的连接:

打开与气象站设备的连接,并读取环境湿度:

关闭设备:

配置 GPIO 设备(如 Raspberry Pi )的引脚 17 以进行读取,并读取上面的数字值:

Wolfram Research (2014),DeviceRead,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeviceRead.html.

文本

Wolfram Research (2014),DeviceRead,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeviceRead.html.

CMS

Wolfram 语言. 2014. "DeviceRead." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DeviceRead.html.

APA

Wolfram 语言. (2014). DeviceRead. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DeviceRead.html 年

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_deviceread, organization={Wolfram Research}, title={DeviceRead}, year={2014}, url={https://reference.wolfram.com/language/ref/DeviceRead.html}, note=[Accessed: 21-November-2024 ]}