Hi all
Is this the best way to pick up udp data and print it to serial?
void loop() {
// if there's data available, read a packet
int packetSize = Udp.parsePacket();
if (packetSize)
{
// read the packet into packetBufffer
int len = Udp.read(packetBuffer, 255);
if (len > 0) packetBuffer[len] = 0;
Serial.println(packetBuffer);
}
}
How many prints can I do per sec? Anything that can be done to reduce loses?
Br,
Peter