function R = getArduinoRoot(varargin)
% getArduinoRoot
% Copyright 2015 - 2016 The MathWorks, Inc.

   R = getenv('ARDUINO_ROOT');
   if isempty(R)
       error('Arudino support package doesn''t seem to be installed');
   end
   if nargin > 0
       R = fullfile(R, varargin{:});
   end
end