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

Test.m
% A simple hardware test for the Velleman K8055 package. Tests the digital
% and analog outputs using the power of flashing lights. All output
% indicator lights should flash five times at 1Hz. The digital output 
% lights will then count down from 255 in binary while the analog output
% lights slowly dim. Is a good first test for the ability to communicate
% with a K8055 board.

%   Copyright 2011 The MathWorks, Inc.

board = vellboard.ExperimentBoard;

for i = 1:5
    board.writeDigitalAll([1 1 1 1 1 1 1 1]);
    board.writeAnalogAll([255 255]);
    pause(.5)
    board.writeDigitalAll([0 0 0 0 0 0 0 0]);
    board.writeAnalogAll([0 0]);
    pause(.5)
end

for i = 255:-1:0
    board.writeDigitalAll(vellboard.util.int2binvec(i));
    board.writeAnalogAll([i i]);
    pause(.01)
end

fprintf('\nTest Successful!\n');

delete(board);

Contact us