Skip to content

Commit

Permalink
Merged in feature/add-led-support (pull request #19)
Browse files Browse the repository at this point in the history
Add files for LED support to Matlab

Approved-by: Ben Quan
Approved-by: Jordan Leiber
  • Loading branch information
Fred Kummer committed Aug 6, 2024
2 parents 7b8bf42 + a65e7eb commit 2095d9d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
35 changes: 35 additions & 0 deletions iq/src/clients/RgbLedClient.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
% RgbLedClient allows the user to control the RGB LED on an LED board connected to a Vertiq module.
%
% Example:
% % Make a communication interface object
% com = MessageInterface('COM3', 115200);
% % Make a RgbLedClient object with obj_id 0
% rgbLed = RgbLedClient('com', com);
% % Use the RgbLedClient object
% rgbLedRed = rgbLed.get('red');
%
% Copyright 2024 Vertiq [email protected]
%
% This file is part of the Vertiq Matlab API.
%
% This code is licensed under the MIT license (see LICENSE or https://opensource.org/licenses/MIT for details)
%
% Name: RgbLedClient.m
% Last update: 2024/08/05 by Fred Kummer
% Author: Fred Kummer
% Contributors:

classdef RgbLedClient < Client

methods

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Constructor, from JSON Parameters

function obj = RgbLedClient(varargin)
args = varargin;
args = [args, {'filename', 'rgb_led.json'}];
obj@Client(args{:});
end
end
end
35 changes: 35 additions & 0 deletions iq/src/clients/WhiteLedClient.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
% WhiteLedClient allows the user to control the white LED on an LED board connected to a Vertiq module.
%
% Example:
% % Make a communication interface object
% com = MessageInterface('COM3', 115200);
% % Make a WhiteLedClient object with obj_id 0
% whiteLed = WhiteLedClient('com', com);
% % Use the WhiteLedClient object
% whiteLedIntensity = whiteLed.get('intensity');
%
% Copyright 2024 Vertiq [email protected]
%
% This file is part of the Vertiq Matlab API.
%
% This code is licensed under the MIT license (see LICENSE or https://opensource.org/licenses/MIT for details)
%
% Name: WhiteLedClient.m
% Last update: 2024/08/05 by Fred Kummer
% Author: Fred Kummer
% Contributors:

classdef WhiteLedClient < Client

methods

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Constructor, from JSON Parameters

function obj = WhiteLedClient(varargin)
args = varargin;
args = [args, {'filename', 'white_led.json'}];
obj@Client(args{:});
end
end
end
2 changes: 1 addition & 1 deletion iq/src/clients/client_files

0 comments on commit 2095d9d

Please sign in to comment.