OK Sorry, I missed the deference, been staring at all this for 3 days....
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\RS\Documents\Arduino\Pentametric_Coms\Pentametric_Coms.ino: In function 'void SendADCData()':
Pentametric_Coms:98: error: 'class EthernetUDP' has no member named 'send'
Udp.send(81, DestinationAddress, DestinationPort ); // the message to send to get BV
^
Pentametric_Coms:99: error: 'class EthernetUDP' has no member named 'send'
Udp.send(01, DestinationAddress, DestinationPort ); //
^
Pentametric_Coms:100: error: 'class EthernetUDP' has no member named 'send'
Udp.send(02, DestinationAddress, DestinationPort ); //
^
Pentametric_Coms:101: error: 'class EthernetUDP' has no member named 'send'
Udp.send(77, DestinationAddress, DestinationPort ); //
^
exit status 1
'class EthernetUDP' has no member named 'send'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
this is the version on my IDE eathernet2 Library.
/*
UDPSendReceive.pde:
This sketch receives UDP message strings, prints them to the serial port
and sends an "acknowledge" string back to the sender
A Processing sketch is included at the end of file that can be used to send
and received messages for testing with a computer.
created 21 Aug 2010
by Michael Margolis
This code is in the public domain.
*/
#include <SPI.h> // needed for Arduino versions later than 0018
#include <Ethernet2.h>
#include <EthernetUdp2.h> // UDP library from: bjoern@cs.stanford.edu 12/30/2008
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);
unsigned int localPort = 8888; // local port to listen on
// buffers for receiving and sending data
char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
char ReplyBuffer[] = "acknowledged"; // a string to send back
// An EthernetUDP instance to let us send and receive packets over UDP
EthernetUDP Udp;
void setup() {
// start the Ethernet and UDP:
Ethernet.begin(mac, ip);
Udp.begin(localPort);
Serial.begin(9600);
}
void loop() {
// if there's data available, read a packet
int packetSize = Udp.parsePacket();
if (packetSize)
{
Serial.print("Received packet of size ");
Serial.println(packetSize);
Serial.print("From ");
IPAddress remote = Udp.remoteIP();
for (int i = 0; i < 4; i++)
{
Serial.print(remote[i], DEC);
if (i < 3)
{
Serial.print(".");
}
}
Serial.print(", port ");
Serial.println(Udp.remotePort());
// read the packet into packetBufffer
Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
Serial.println("Contents:");
Serial.println(packetBuffer);
// send a reply, to the IP address and port that sent us the packet we received
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write(ReplyBuffer);
Udp.endPacket();
}
delay(10);
}
Errors
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:35:6: error: 'UdpClass' has not been declared
void UdpClass::begin(uint16_t port) {
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'void begin(uint16_t)':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:36:3: error: '_port' was not declared in this scope
_port = port;
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:37:3: error: '_sock' was not declared in this scope
_sock = 0; //TODO: should not be hardcoded
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:44:10: error: 'UdpClass' has not been declared
uint16_t UdpClass::sendPacket(uint8_t * buf, uint16_t len, uint8_t * ip, uint16_t port){
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'uint16_t sendPacket(uint8_t*, uint16_t, uint8_t*, uint16_t)':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:45:17: error: '_sock' was not declared in this scope
return sendto(_sock,(const uint8_t *)buf,len,ip,port);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:50:10: error: 'UdpClass' has not been declared
uint16_t UdpClass::sendPacket(const char str[], uint8_t * ip, uint16_t port){
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'uint16_t sendPacket(const char*, uint8_t*, uint16_t)':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:56:17: error: '_sock' was not declared in this scope
return sendto(_sock,(const uint8_t *)str,len,ip,port);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:60:5: error: 'UdpClass' has not been declared
int UdpClass::available() {
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'int available()':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:61:10: error: 'W5500' was not declared in this scope
return W5500.getRXReceivedSize(_sock);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:61:34: error: '_sock' was not declared in this scope
return W5500.getRXReceivedSize(_sock);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:70:5: error: 'UdpClass' has not been declared
int UdpClass::readPacket(uint8_t * buf, uint16_t bufLen, uint8_t *ip, uint16_t *port) {
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'int readPacket(uint8_t*, uint16_t, uint8_t*, uint16_t*)':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:79:10: error: '_sock' was not declared in this scope
recv(_sock,tmpBuf,8);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:115:19: error: '_sock' was not declared in this scope
return recvfrom(_sock,buf,bufLen,ip,port);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:119:5: error: 'UdpClass' has not been declared
int UdpClass::readPacket(uint8_t * buf, uint16_t len) {
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: In function 'int readPacket(uint8_t*, uint16_t)':
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:122:19: error: '_sock' was not declared in this scope
return recvfrom(_sock,buf,len,ip,port);
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp: At global scope:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:125:5: error: 'UdpClass' has not been declared
int UdpClass::readPacket(char * buf, uint16_t bufLen, uint8_t *ip, uint16_t &port) {
^
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:136:1: error: 'UdpClass' does not name a type
UdpClass EthernetUdp2;
^
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.