MATLAB传感器工具包,游标传感器的Matlab支持包

MATLAB Support Package for Vernier SensorDAQ

Vernier SensorDAQ (www.vernier.com/sensordaq) is a USB data-acquisition interface. It can be used to gather data from Vernier sensors (www.vernier.com/sensors) and also includes terminals for analog and digital I/O.

This support package extends the capabilites of Data Acquisition Toolbox (R2011b or later), and allows you to access the following SensorDAQ capabilities:

* Vernier analog sensor measurements

* Analog I/O (using the terminals)

* Counter input

* Digital I/O

The support package uses Data Acquisition Toolbox's "Session-based Interface" (except for the digital I/O, which uses the Legacy interface and requires 32-bit MATLAB).

Sample usage:

% --- Read a Vernier Sensor ---

session = sdaq.createSession();

sdaq.addSensor(session, 1, sdaq.Sensors.Barometer);

% the scaling function converts raw voltage to physical units

scale = sdaq.getScaleFun(sdaq.Sensors.Barometer);

% get a single measurement, and convert to physical units

rawdata = session.inputSingleScan();

data = scale(rawdata);

% collect 2 seconds worth of data

session.DurationInSeconds = 2.0;

rawdata = session.startForeground();

data = scale(rawdata);

% --- Analog input ---

session = sdaq.createSession();

sdaq.addAnalogInput(session,0);

% collect 2 seconds worth of data

session.DurationInSeconds = 2.0;

data = session.startForeground();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值