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

ButtonLED.m
% Script that links digital inputs 1-4 to digital outputs 1-4. Use the
% buttons to control the output indicator LEDS. Use button 5 to end the
% script.

%   Copyright 2011 The MathWorks, Inc.

board = vellboard.ExperimentBoard;

exitpress = 0;

while ~exitpress
    btn1 = board.readDigital(1);
    btn2 = board.readDigital(2);
    btn3 = board.readDigital(3);
    btn4 = board.readDigital(4);
    
    exitpress = board.readDigital(5);
    
    board.writeDigital(1,btn1);
    board.writeDigital(2,btn2);
    board.writeDigital(3,btn3);
    board.writeDigital(4,btn4);
end

delete(board);
    

Contact us