Code Monkey home page Code Monkey logo

Comments (6)

andrematteo avatar andrematteo commented on June 13, 2024

Please post your code.
I am using this module, and it works

from ethercard.

alejandro-anv avatar alejandro-anv commented on June 13, 2024

It fails with the sample programs included with the library.

from ethercard.

vicatcu avatar vicatcu commented on June 13, 2024

@andrematteo 99% likely you are running an Arduino installation that you installed via a package manager and it is using a more recent version of avr-gcc than what is supported by the Arduino baseline you get if you download it from the arduino.cc website.

from ethercard.

andrematteo avatar andrematteo commented on June 13, 2024

@alejandro-anv

Close your arduino 1.3 and Modify the following files.

arduino-1.0.3\libraries\ethercard\enc28j60.cpp

----------- FROM -----------------------
#if ARDUINO >= 100
#include Arduino.h // Arduino 1.0
#else
#include <Wprogram.h> // Arduino 0022
#endif
#include "enc28j60.h"

--------------TO---------------------
#include Arduino.h // Arduino 1.0
#include "enc28j60.h"

arduino-1.0.3\libraries\ethercard\EtherCard.h

---------------FROM--------------------
#if ARDUINO >= 100
#include Arduino.h // Arduino 1.0
#define WRITE_RESULT size_t
#define WRITE_RETURN return 1;
#else
#include <WProgram.h> // Arduino 0022
#define WRITE_RESULT void
#define WRITE_RETURN
#endif
---------------TO --------------------
#include Arduino.h // Arduino 1.0
#define WRITE_RESULT size_t
#define WRITE_RETURN return 1;


Check your pins

Module Ethernet --> Arduino

INT -------> 02
SO -------> 12
SCK -----> 13
SI ---------> 11
CS --------> 08
RESET --> RESET
VCC ------> 3.3V

Reopen and test any example.

Except the twitter example contains an error. but already solved.

from ethercard.

andrematteo avatar andrematteo commented on June 13, 2024

NOTE
Put Arduino.h between <<Arduino.h>>

#include Arduino.h // Arduino 1.0

the right not left in the post

from ethercard.

alejandro-anv avatar alejandro-anv commented on June 13, 2024

andrematteo: Thank you. The problem was that other libraries defaults the CS pin to 10 (in order to connect (10,11,12 and 13). Adding the CS parameter worked OK.

from ethercard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.