Shield arduino ethernet

Quand je met le serial monitor j'ai ...... RIEN!!!

Je précise que j'ai moi meme monté le module (donc soudé) et apparament il y a des contacts partout, sur la prise RJ45 j'ai les deux led allumée.

Je ne vois pas quoi faire

tahsc:
Quand je met le serial monitor j'ai ...... RIEN!!!

Je précise que j'ai moi meme monté le module (donc soudé) et apparament il y a des contacts partout, sur la prise RJ45 j'ai les deux led allumée.

Je ne vois pas quoi faire

tu a bien mis le serial monitor à 57600 ? 8)

AHH mercii j'avais oublié de mettre sur 57600.

Mais la il me met DHCP failed

tahsc:
AHH mercii j'avais oublié de mettre sur 57600.

Mais la il me met DHCP failed

Alors ton shield n'est pas reconnu
fais des photos (claires , lisibles) de tes soudures

mes soudures m'ont l'air bonnes

Artouste:
reprend tout à zero en essayant l'exemple cité par Christian

C'est qui Christian? :grin:

tahsc:
mes soudures m'ont l'air bonnes

Pas si bonnes que ça, j'ai l'impression qu'il manque un peu de matière sur certaines avec des pattes dans le vide non?

john_lenfr:

Artouste:
reprend tout à zero en essayant l'exemple cité par Christian

C'est qui Christian? :grin:

:grin:
rendons à Cesar !
désolé je devais finir de lire un autre topic 8)

tahsc:
mes soudures m'ont l'air bonnes

c'est vite dit :grin:
fais une reprise complete et verifie qu'il n'y ai pas de ponts intempestifs

Et moi je veux bien une photo du dessus pour vérifier l'orientation des composants :grin:

Parce que un condo ou un chip mis à l'envers ça va vite...

Bon d'accord j'avoue qu'elles ne sont pas si belles que sa ... XD

Je repasserais un coup de fer quand j'aurais le temps :stuck_out_tongue:

Je vous tiens au courant

ça ressemble à ce que ça devrait mais je ne comprends pas c'est quoi le paté noir en haut de ta photo, t'a dérapé du fer?

lol oué j'ai pas fait exprès j'ai mis un coup de fer

C'EST BON!!

J'ai donc remis un petit coup de fer à souder et sa marche il à attribuer une IP, un masque, un dns!!!

MERCI

Il y a écrit "Surf to this IP to view the Arduino Server: 192.168.1.52"

mais quand je vais sur l'ip, j'ai la page d'erreur de firefox

tahsc:
Il y a écrit "Surf to this IP to view the Arduino Server: 192.168.1.52"

mais quand je vais sur l'ip, j'ai la page d'erreur de firefox

tu vois : entre des bonnes soudures et des mauvaise soudures :grin:
en dehors de l'adresse IP le serial donne d'autres infos
liste tout là

C'est vrai c'est vrai :stuck_out_tongue:

Bon voici ce que j'ai dans le moniteur :

[Starting the Arduino Server]
MAC: 74:69:69:2D:30:31
Setting up DHCP (this can take a while...)
IP: 192.168.1.52
Netmask: 255.255.255.0
GW IP: 192.168.1.1
DNS IP: 192.168.1.1
Surf to this IP to view the Arduino Server: 192.168.1.52

tahsc:
C'est vrai c'est vrai :stuck_out_tongue:

tu tape directement l'adresse IP comme ça ? 192.168.1.52
Essaie avec
http://192.168.1.52/
Je me souviens d'avoir eu un probleme avec un navigateur , la premiere methode ne lui plaisait pas

Bonjour
Tout d'abbord, pour l'aide que vous m'avez apportée.

Je vous sollicite maintenant car je doit utiliser mon shield pour créer un petit serveur web pour envoyer des informations acqises grace à l'arduino sur le net.

On m'a dit plus haut que mon shield est basé sur un enc28J60 et le code exemple que je souhaite réinverstir est basé sur un W5100.

Comment adapter le code?

Merci

/*
  Web Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe
 
 */

#include <SPI.h>
#include <Ethernet.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,60);

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
	  client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("
");       
          }
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}

Inutile de reprendre ce code basé sur un 5100, tu as déjà un exemple de webserver dans la librairie du enc28J60.

// This is a demo of the RBBB running as webserver with the Ether Card
// 2010-05-28 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

#include <EtherCard.h>

// ethernet interface mac address
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
// ethernet interface ip address
static byte myip[] = { 192,168,0,188 };
// gateway ip address
static byte gwip[] = { 192,168,0,1 };

byte Ethernet::buffer[500];
BufferFiller bfill;

void setup () {
  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
    Serial.println( "Failed to access Ethernet controller");
  ether.staticSetup(myip);
}

static word homePage() {
  long t = millis() / 1000;
  word h = t / 3600;
  byte m = (t / 60) % 60;
  byte s = t % 60;
  bfill = ether.tcpOffset();
  bfill.emit_p(PSTR(
    "HTTP/1.0 200 OK\r\n"
    "Content-Type: text/html\r\n"
    "Pragma: no-cache\r\n"
    "\r\n"
    "<meta http-equiv='refresh' content='1'/>"
    "<title>RBBB server</title>" 
    "<h1>$D$D:$D$D:$D$D</h1>"),
      h/10, h%10, m/10, m%10, s/10, s%10);
  return bfill.position();
}

void loop () {
  word len = ether.packetReceive();
  word pos = ether.packetLoop(len);
  
  if (pos)  // check if valid tcp data is received
    ether.httpServerReply(homePage()); // send web page data
}

Sinon tu regardes ici je pense que tu trouveras ton bonheur:

MERCi!! :wink: