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

SimpleAnalogStripchart.m
% A fancier version of AnalogPlot that plots data from an analog port in
% real time using EasyGUI. Use the stop button to stop plotting data.

%   Copyright 2011 The MathWorks, Inc.

board = vellboard.ExperimentBoard; %connect to board
chartgui = gui.autogui; %create GUI

chart = gui.stripchart(gca(),100); %add stripchart
exitbtn = gui.togglebutton('Exit'); %add exit button


while ~exitbtn.Value
    data = board.readAnalog(1); %get data
    chart.update(data); %update
    pause(.1); %and wait
end

%cleanup
delete(board);
delete(chartgui);

Contact us