pb_lightwarning.m 1.14 KB
Newer Older
Jesse Heckman's avatar
Jesse Heckman committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
function pb_lightwarning()
% PB_LIGHTWARNING()
%
% PB_LIGHTWARNING()  ...
%
% See also ...

% PBToolbox (2019): JJH: j.heckman@donders.ru.nl

   import org.zeromq.ZMQ
   
   leds = ledcontroller_pi('dcn-led06','dcn-led07','dcn-led09','dcn-led10');

   n     = 4;
   s     = ledpattern(n);
   ir    = 50;
   ig    = ir;

   % Sequence needs updating due to new SLC distribution
   seq1  = [0:9 fliplr(16:1:63)]; %% [0:2:63];
   seq2  = []; %% [1:2:63];
   
   for iC = 1:n
      if mod(iC,2) == 0
         s(iC).set(seq1,'r');
      else 
         s(iC).set(seq2,'g');
      end
       s(iC).intensity('r', ir);
       s(iC).intensity('g', ig);
   end
   
   leds.write(s);
   
   for iC = 1:n
      leds.trigger;
Jesse Heckman's avatar
Jesse Heckman committed
37
      if ~iseven(iC); pause(0.3); else; pause(0.15); end
Jesse Heckman's avatar
Jesse Heckman committed
38 39 40 41 42 43 44 45 46 47 48
   end
   delete(s);
end
 
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
%                                                           %
%       Part of Programmeer Beer Toolbox (PBToolbox)        %
%       Written by: Jesse J. Heckman (2019)                 %
%                                                           %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %