Trouble with multiple universes of Art-Net

Hi, I'm having a bit of trouble outputting multiple universes of DMX from Art-Net using an Arduino Mega 2560.
I'm using the four universes DMX library and the Hideakiti art-net library.

https://blog.deskontrol.net/arduino-four-universes-dmx-512-library/

https://github.com/hideakitai/ArtNet

This is my code. The issue is a bit strange. The first universe of DMX output works fine but the other one rapidly flickers when I send any data to it. I suspect it's struggling to update in time as this works fine if I only use 2 channels but I want to output a full universe.

Any ideas for what I could do about this would be much appreciated.


void setup() {
  Ethernet.init(53);

  Ethernet.begin(mac,ip);
  Ethernet.setSubnetMask(subnet);

  artnet.begin();
//  artnet.subscribe_net(0);
//  artnet.subscribe_subnet(0);

  ArduinoDmx0.init_tx(DMX512);
  ArduinoDmx1.init_tx(DMX512);
  
  
  //start address for first universe will always be 1 as we always want to output a full universe
  ArduinoDmx0.set_tx_address(1);
  ArduinoDmx1.set_tx_address(1);
  //number of channels in first universe will be 512 as we want to output a whole universe
  ArduinoDmx0.set_tx_channels(512);
  ArduinoDmx1.set_tx_channels(512);


  //artnet callbacks
  artnet.subscribe(universe1, [&](const uint8_t* data, const uint16_t size){
    for(int i = 0;i<512; i++){
      ArduinoDmx0.TxBuffer[i] = data[i];
    }
  });

  artnet.subscribe(universe2, [&](const uint8_t* data, const uint16_t size){
    for(int i = 0; i<512;i++){
      ArduinoDmx1.TxBuffer[i] = data[i];
    }
  });

}
void loop() {
  artnet.parse();
}

Thanks in advance.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.