User Manual
if ( packetSize )
{
// Print out the contents with remote information
Serial.printf("Received %d bytes from ", packetSize);
Serial.print( IPAddress(udp.remoteIP()) );
Serial.print( " : ");
Serial.println( udp.remotePort() );
udp.read(packetBuffer, sizeof(packetBuffer));
Serial.print("Contents: ");
Serial.write(packetBuffer, packetSize);
Serial.println();
// Echo back contents
udp.beginPacket(udp.remoteIP(), udp.remotePort());
udp.write(packetBuffer, packetSize);
udp.endPacket();
}
}
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 93 of 202










