2 arduinos Artnet

Hi.

I have 2 arduinos Mega with 1 ethernet Shield each. I am connecting both to a router, and sending data to each arduino via artnet from a computer that is connected to the same router.

When i test the localIPadress of each arduino it is the same for both. so i think that i need to change the IP adress of each one. but when i change the IP address of the arduino:

"IPAddress ip(192, 168, 1, 99);"

the comunication from the computer is not working.

i m using the artNet library with the example: "ArtNetNeoPixelRGBW"

resuming i want to connect 2 arduinos to a computer via a router, and it´s not working.

Thank you in advance

Hi Frederico. Generally what happens here is we try to help people with their coding problems, or perhaps the electrical issues regarding a particular configuration. To do this we tend to review your code and/or your wiring diagrams. When neither of those things are available, there's not a lot we can do. In your case, posting your code would go a long way towards receiving some assistance. Have a nice day.

both arduinos have the same code.
this is the example "ArtNetNeoPixelRGBW" from artnet library:

/*
This example will receive multiple universes via Artnet and control a strip of sk6812RGBW leds via
Adafruit's NeoPixel library: https://github.com/adafruit/Adafruit_NeoPixel
This example may be copied under the terms of the MIT license, see the LICENSE file for details
*/

#include <Artnet.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <Adafruit_NeoPixel.h>

// Neopixel settings
const int numLeds = 352; // change for your setup
const int channelsPerLed = 4;
const int numberOfChannels = numLeds * channelsPerLed; // Total number of channels you want to receive (1 led = 4 channels)
const byte dataPin = 2;
Adafruit_NeoPixel leds = Adafruit_NeoPixel(numLeds, dataPin, NEO_GRBW + NEO_KHZ800);

// Artnet settings
Artnet artnet;
const int startUniverse = 0; // CHANGE FOR YOUR SETUP most software this is 1, some software send out artnet first universe as 0.

// Check if we got all universes
const int maxUniverses = numberOfChannels / 512 + ((numberOfChannels % 512) ? 1 : 0);
bool universesReceived[maxUniverses];
bool sendFrame = 1;
int previousDataLength = 0;

// Change ip and mac address for your setup
byte ip[] = {192, 168, 1, 65};
byte mac[] = {0x04, 0xE9, 0xE5, 0x00, 0x69,0xEC};



void setup()
{
 //Serial.begin(115200);
 artnet.begin(mac, ip);
 leds.begin();
 initTest();

 // this will be called for each packet received
 artnet.setArtDmxCallback(onDmxFrame);
}

void loop()
{
 // we call the read function inside the loop
 artnet.read();
}

void onDmxFrame(uint16_t universe, uint16_t length, uint8_t sequence, uint8_t* data, IPAddress remoteIP)
{
 sendFrame = 1;
 // set brightness of the whole strip
 if (universe == 15)
 {
   leds.setBrightness(data[0]);
   leds.show();
 }

 // Store which universe has got in
 if ((universe - startUniverse) < maxUniverses)
   universesReceived[universe - startUniverse] = 1;

 for (int i = 0 ; i < maxUniverses ; i++)
 {
   if (universesReceived[i] == 0)
   {
     //Serial.println("Broke");
     sendFrame = 0;
     break;
   }
 }

 // read universe and put into the right part of the display buffer
 for (int i = 0; i < length / channelsPerLed; i++)
 {
   int led = i + (universe - startUniverse) * (previousDataLength / channelsPerLed);
   if (led < numLeds) {
     if (channelsPerLed == 4)
       leds.setPixelColor(led, data[i * channelsPerLed], data[i * channelsPerLed + 1], data[i * channelsPerLed + 2], data[i * channelsPerLed + 3]);
     if (channelsPerLed == 3)
       leds.setPixelColor(led, data[i * channelsPerLed], data[i * channelsPerLed + 1], data[i * channelsPerLed + 2]);
   }
 }
 previousDataLength = length;

 if (sendFrame)
 {
   leds.show();
   // Reset universeReceived to 0
   memset(universesReceived, 0, maxUniverses);
 }
}

void initTest()
{
 for (int i = 0 ; i < numLeds ; i++)
   leds.setPixelColor(i, 127, 0, 0, 0);
 leds.show();
 delay(500);
 for (int i = 0 ; i < numLeds ; i++)
   leds.setPixelColor(i, 0, 127, 0, 0);
 leds.show();
 delay(500);
 for (int i = 0 ; i < numLeds ; i++)
   leds.setPixelColor(i, 0, 0, 127, 0);
 leds.show();
 delay(500);
   for (int i = 0 ; i < numLeds ; i++)
   leds.setPixelColor(i, 0, 0, 0, 127);
 leds.show();
 delay(500);
 for (int i = 0 ; i < numLeds ; i++)
   leds.setPixelColor(i, 0, 0, 0, 0);
 leds.show();
}

I guess you missed the bit about reading and code tags.