Code covered by the BSD License  

Highlights from
MATLAB Support Package for Velleman K8055/VM110 Experiment Board

MATLAB Support Package for Velleman K8055/VM110 Experiment Board

by

 

MATLAB library for communicating with a Velleman K8055/VM110 USB Experiment Interface Board

BinaryAnalog.m
% Takes the input from an analog channel, converts it to binary, and
% displays it using the digital outputs. Use digital input 5 to stop.

%   Copyright 2011 The MathWorks, Inc.

analogchan = 1; %analog channel to read

board = vellboard.ExperimentBoard;
exitpressed = 0;

while ~exitpressed
    analog = board.readAnalog(analogchan);
    datavec = vellboard.util.int2binvec(analog);
    board.writeDigitalAll(datavec);
    exitpressed = board.readDigital(5);
end

delete(board);

Contact us