washo4evr / Socket.io-v1.x-Library

Socket.io Library for Arduino
108 stars 58 forks source link

Problem with ENC28J60 etherCard.h #36

Open gemins opened 7 years ago

gemins commented 7 years ago

Hello, i have problems with implementation this library with Arduino uno + Ethernet Card ENC28J60, this library use a UIPEthernet.h, but this not have a some example to use. I have the library Ethercard.h but i cant change the library in the H file.

Change in the H file this:

#if defined(ENC28J60CARD) //change defined for some conflics of definition with ENC28J60
#include <EtherCard.h>  //<UIPEthernet.h>
//#include "SPI.h"      //For ENC28J60
#endif

AND

Ethernet client; //EthernetClient client;               //For ENC28J60 or W5100
//WiFiClient client;                        //For ESP8266

and in the sketh include the libraries:

#define ENC28J60CARD
#include <EtherCard.h>
#include "SocketIOClient.h"

But i have some errors:

In file included from /Users/Me/Documents/Arduino/libraries/Socket.io/SocketIOClient.cpp:28:0: /Users/Me/Documents/Arduino/libraries/Socket.io/SocketIOClient.h:73:5: error: 'Ethernet' does not name a type Ethernet client; //EthernetClient client; //For ENC28J60 or W5100 ^ /Users/Me/Documents/Arduino/libraries/Socket.io/SocketIOClient.cpp: In member function 'bool SocketIOClient::connect(char, int, char)': /Users/Me/Documents/Arduino/libraries/Socket.io/SocketIOClient.cpp:39:9: error: 'client' was not declared in this scope

I hope you can help me.

Thanks.

washo4evr commented 7 years ago

can you check that Ethernet is the correct to create a new client : the error message says "error: 'Ethernet' does not name a type"