Advertisement
RuiViana

DMX_Due

Sep 25th, 2017
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. #include <DmxDue.h>
  2.  
  3. //------------------------------------
  4. void setup()
  5. {
  6.   DmxDue1.begin();
  7.   DmxDue2.begin();
  8.   DmxDue3.begin();
  9. }
  10. //------------------------------------
  11. void loop()
  12. {
  13.   byte Canais = 255;
  14.   DmxDue1.setTxMaxChannels(Canais);
  15.   DmxDue2.setTxMaxChannels(Canais);
  16.   DmxDue3.setTxMaxChannels(Canais);
  17.   DmxDue1.beginWrite();
  18.   DmxDue1.markAfterBreak();
  19.   DmxDue2.beginWrite();
  20.   DmxDue2.markAfterBreak();
  21.   DmxDue3.beginWrite();
  22.   DmxDue3.markAfterBreak();
  23.   for (int i = 1; i < (Canais + 1); i++)
  24.   {
  25.     DmxDue1.write(i, i + 1);
  26.     DmxDue1.IrqHandler();
  27.     DmxDue2.write(i, i + 1);
  28.     DmxDue2.IrqHandler();
  29.     DmxDue3.write(i, i + 1);
  30.     DmxDue3.IrqHandler();
  31.     delayMicroseconds(50);
  32.   }
  33.   delayMicroseconds(1000);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement