Ok, I've setup a network for my test and now I have the IP address assigned.
Just to be clear: my setup is composed by an Arduino reading 4 sensor and sending their values via UDP packets to a Node.js server. Everything was working fine with my Ethernet shield of course ![]()
I had 3 global variables declared:
IPAddress receiverIP(192, 168, 2, 34); // IP of udp packets receiver
unsigned int receiverPort = 9100; // port to listen on my PC
EthernetUDP Udp;
In my setup I was initializing the EthernetUDP object:
Udp.begin(9100);
...and then I my loop I was reading my sensors and sending them like this:
byte valueInBytes[8] = {lowByte(firstSensorValue), highByte(firstSensorValue),
lowByte(secondSensorValue), highByte(secondSensorValue),
lowByte(thirdSensorValue), highByte(thirdSensorValue),
lowByte(forthSensorValue), highByte(forthSensorValue)
}; //convert it to byte array
Udp.beginPacket(receiverIP, receiverPort); //start udp packet
Udp.write(valueInBytes, 8); //write sensor data to udp packet
Udp.endPacket(); // end packet
Now, I'm a n00b and the setup it's getting quite complex for me, but since I switch to your library I don't know how to adapt my code to have everything working.
Any help would be appreciated ![]()