22byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
42 String sensorValue =
"Example data: " + String(random(0, 100));
43 unsigned long timestamp =
millis();
45 sensorValue +
", Timestamp: " + String(timestamp) +
"\n";
46 int dataLength = dataToSend.length();
47 char dataBuffer[dataLength + 1];
48 dataToSend.toCharArray(dataBuffer, dataLength + 1);
51 udp.write(dataBuffer, dataLength);
54 Serial.print(
"Sent (UDP): ");
IPAddress receiverIP(192, 168, 2, 20)
IPAddress dns(192, 168, 2, 1)
IPAddress subnet(255, 255, 255, 0)
IPAddress staticIP(192, 168, 2, BOARD_ID_DEFAULT)
IPAddress gateway(0, 0, 0, 0)
static IPAddress subnet(255, 255, 255, 0)
static IPAddress gateway(192, 168, 2, 1)
IPAddress dns(192, 168, 2, 1)
IPAddress staticIP(192, 168, 2, 101)
IPAddress receiverIP(192, 168, 2, 1)