Bonjour , bon malgré plusieurs corrections de code , j ' observe toujours le probleme principal .
les PINS fonctionnent correctement , mais la connexion au reseau est systematiquement perdue au bout de quelques heures .
Mon montage comprend :
- un mega2560
- un DS1307
- un shield ethernet W5500
- une chiée de relais .
je sais que le DS1307 utilise les pins 20 et 21 .
mais je ne sais pas quel PINS sont utilisés par le W5500 , qui lui est enfiché directement dessus le mega ...
Autre chose , au niveau de la configuration , dans le code je vois ce commentaire :
Arduino communicates with both the Ethernet Shield and SD card using the SPI bus
This is on digital pins 10, 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega.
Pin 10 is used to select the Ethernet chip and pin 4 for the SD card.
These pins cannot be used for general I/O.
On the Mega, the hardware SS pin, 53, is not used to select either the Ethernet chip or the SD card,
but it must be kept as an output or the SPI interface won't work.
Note that because the Ethernet chip and SD card share the SPI bus, only one at a time can be active.
If you are using both peripherals in your program, this should be taken care of by the corresponding libraries.
If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it.
To do this with the SD card, set pin 4 as an output and write a high to it.
For the Ethernet chip, set digital pin 10 as a high output.
Du coup , est ce que je dois passer le pin 4 et le 53 en mode OUPUT et en etat HIGH a l' initialisation du programme , j' avoue que là je suis un peu largué 
Pour info , voici les pins qui sont utilisés dans mon programme si ca peut etre utile :
// 22 => 29 : ouvertures volets
// 30 => 37 fermetures volets
// 38 => 43 arrosages
// 44 => Portail
// 45 => Relais Heures Creuses
// 46
// 47
// 48 Alim Capteur Pluie
// 49 Alim Capteur humidité
// A0 Capteur Pluie
// A1 Capteur Humidité