// UDPStorm - Send massive UDP to measure Arduion Ethernet Performance #include // needed für Arduino versions later than 0018 #include // Ethernet Library #include // UDP library from: bjoern@cs.stanford.edu 12/30/2008 byte localmac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC address IPAddress localip(192, 168, 178, 177); // local port to listen on unsigned int localport = 8888; IPAddress destinationip(192, 168, 178, 34); unsigned int destinationport = 8888; // local port to listen on const int buffersize = 160; char ReplyBuffer[buffersize]; // buffers with 100 bytes EthernetUDP udp; // An EthernetUDP instance to send packets over UDP void setup() { für (int i = 0 ; i < buffersize; i++) { ReplyBuffer[i]='A'; } Ethernet.begin(localmac,localip); // start the Ethernet and UDP: udp.begin(localport); } void loop() { // send UDP Pakets udp.beginPacket(destinationip, destinationport); udp.write(ReplyBuffer); udp.endPacket(); }