Quand je branche l’Arduino Mega + Shield Ethernet W5100 sur la prise USB du PC portable, Ethernet fonctionne et les voyants de la carte Shield Ethernet clignotent. Quand je branche l’Arduino Mega + Shield Ethernet + alimentation 220v-18v-10A. Les voyants rouges des cartes s’allument, mais pas les voyants du réseau Ethernet. Il y a juste les voyants rouges des deux cartes. Est-ce que se serait un problème avec le langage C++ ou une erreur quand j‘ai retranscrit le programme avant de le téléverser. Les cartes sont branchées comme sur le schéma. Avant de téléverser un nouveau programme, doit-on remettre la carte Arduino Mega à zéro (reset). Doit-on mettre impérativement une carte mémoire Micro SD dans l’emplacement sur la carte Shield Ethernet ? Ci-joint le texte écrit.
Programmation DCCpp_uno, onglet config.h
1 /**********************************************************************
2
3 Config.h
4 COPYRIGHT (c) 2013-2016 Gregg E. Berman
5
6 Part of DCC++ BASE STATION for the Arduino
7
8 **********************************************************************/
9
10 /////////////////////////////////////////////////////////////////////////////////////
11//
12 // DEFINE MOTOR_SHIELD_TYPE ACCORDING TO THE FOLLOWING TABLE:
13 //
14 // 0 = ARDUINO MOTOR SHIELD (MAX 18V/2A PER CHANNEL)
15 // 1 = POLOLU MC33926 MOTOR SHIELD (MAX 28V/3A PER CHANNEL)
16 // 2 = L9110s Dual Motor Driver (MAX 28v/10A PER CHANNEL)
17
18 #define MOTOR_SHIELD_TYPE 2
19
20 /////////////////////////////////////////////////////////////////////////////////////
21 //
22 // DEFINE NUMBER OF MAIN TRACK REGISTER
23
24 #define MAX_MAIN_REGISTERS 12
25
26 /////////////////////////////////////////////////////////////////////////////////////
27 //
28 // DEFINE COMMUNICATIONS INTERFACE
29 //
30 // 0 = Built-in Serial Port
31 // 1 = Arduino.cc Ethernet/SD-Card Shield
32 // 2 = Arduino.org Ethernet/SD-Card Shield
33 // 3 = Seeed Studio Ethernet/SD-Card Shield W5200
34
35 #define COMM_INTERFACE 1
36
37 /////////////////////////////////////////////////////////////////////////////////////
38 //
39 // DEFINE STATIC IP ADDRESS *OR* COMMENT OUT TO USE DHCP
40 //
41
42 #define IP_ADDRESS { 192, 168, 1, 200 }
43
44 /////////////////////////////////////////////////////////////////////////////////////
45 //
46 // DEFINE PORT TO USE FOR ETHERNET COMMUNICATIONS INTERFACE
47 //
48
49 #define ETHERNET_PORT 2560
50
51 /////////////////////////////////////////////////////////////////////////////////////
52 //
53 // DEFINE MAC ADDRESS ARRAY FOR ETHERNET COMMUNICATIONS INTERFACE
54 //
55
56 #define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEF }
57
58 /////////////////////////////////////////////////////////////////////////////////////