Hello guys
I have the next error on the code you can see below.
Test_Chamsys_Ethernet.cpp:23:54: error: too many decimal points in number
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
// 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, 1);
unsigned int localPort = 8080; // local port to listen on
// An EthernetUDP instance to let us send and receive packets over UDP
EthernetUDP Udp;
void setup()
{
Ethernet.begin(0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED, 192.168.1.1); //Start the Ethernet and UDP
Udp.begin(8080);
pinMode(22, INPUT); // Sets the digital pin as input
pinMode(23, INPUT); // Sets the digital pin as input
pinMode(24, INPUT); // Sets the digital pin as input
pinMode(25, INPUT); // Sets the digital pin as input
}
void loop()
{
if (digitalRead(22) && digitalRead(23))
sendPacket("g1");
if (digitalRead(24) && digitalRead(25))
sendPacket("g2");
}
void sendPacket(char *contents)
{
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write(contents);
Udp.endPacket();
}
What's the real problem in this case
And is there anyone who can help me?
Thanks
Leon