udp.begin(1234); // start UDP on port 1234 udp.beginPacket(IPAddress(127, 0, 0, 1), 56); // start a packet sending to IP 127.0.0.1 on port 56. udp.write(0); // write a byte of value 0 to the packet udp.endPacket(); // actually send the packet.