So i wonder whichone is the correct way to send packets through udp and why
like this:
for(byte z=0; z<5;z++)
{
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write("sent ");
itoa(z,stringOne,5);
Udp.write(stringOne);
Udp.endPacket();
}
or
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
for(byte z=0; z<5;z++)
{
Udp.write("sent ");
itoa(z,stringOne,5);
Udp.write(stringOne);
}
Udp.endPacket();
thanks