Code covered by the MathWorks Limited License

Highlights from
Sparkfun RedBot Block Library

image thumbnail

Sparkfun RedBot Block Library

by

 

22 Oct 2013 (Updated )

A library of blocks to get started with the Sparkfun RedBot Kit.

prepareCurrentFolder
function prepareCurrentFolder
% Copies the RedBot Arduino library folder into the current folder

% Copyright 2013 The MathWorks, Inc.

if exist('RedBot','dir')
    return;
end

redbotBlockLibPath = which('sparkfun_redbot_block_lib','-all');
if isempty(redbotBlockLibPath)
    error('Please install the Sparkfun RedBot Block Library first!');
end

redbotpath = [redbotBlockLibPath{1} '\..\Redbot'];

try
   mkdir('RedBot');
   copyfile(redbotpath, [pwd '\RedBot']);
catch err
    error(['There was a error copying the RedBot folder. Please copy the folder from:' redbotpath ' to the current folder']);
end

Contact us