Code covered by the BSD License  

Highlights from
MATLAB Support Package for Parallax BASIC Stamp

image thumbnail

MATLAB Support Package for Parallax BASIC Stamp

by

 

25 Jul 2011 (Updated )

MATLAB library for communicating with a BASIC Stamp 2 and Board of Education (BoE) kit

stamp.X10
% stamp.X10
%   Value class providing aliases for X10 house codes and commands. Use
%   import stamp.X10 to import these aliases and X10.{code} to use the 
%   codes. A list of codes can be found in +stamp\X10.m.
%
%   <a href="http://en.wikipedia.org/wiki/X10">X10</a> is a standard for sending digital signals over standard house AC
%   power lines.

%   MATLAB Support Package for BASIC Stamp
%   Version 1.0
%   Copyright 2011 The MathWorks, Inc.

classdef X10
    
    properties(Constant)
        % "Codes" and their numerical equivilents. The part to the left of
        % the = sign is the code (ie. X10.HouseA is correct.)
        
        HouseA = 0;
        HouseB = 1;
        HouseC = 2;
        HouseD = 3;
        HouseE = 4;
        HouseF = 5;
        HouseG = 6;
        HouseH = 7;
        HouseI = 8;
        HouseJ = 9;
        HouseK = 10;
        HouseL = 11;
        HouseM = 12;
        HouseN = 13;
        HouseO = 14;
        HouseP = 15;
        
        Unit1  = 0;
        Unit2  = 1;
        Unit3  = 2;
        Unit4  = 3;
        Unit5  = 4;
        Unit6  = 5;
        Unit7  = 6;
        Unit8  = 7;
        Unit9  = 8;
        Unit10 = 9;
        Unit11 = 10;
        Unit12 = 11;
        Unit13 = 12;
        Unit14 = 13;
        Unit15 = 14;
        Unit16 = 15;
        
        UnitOn   = bin2dec('10010')
        UnitOff  = bin2dec('11010')
        UnitsOff = bin2dec('11100')
        LightsOn = bin2dec('10110')
        Dim      = bin2dec('11110')
        Bright   = bin2dec('10110')
    end
end

Contact us