Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:index [2020/04/03 21:50] – f1sls | documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:index [2020/04/04 02:02] (Version actuelle) – f1sls | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
====== ENC28J60 based Cards / Modules / Shields ====== | ====== ENC28J60 based Cards / Modules / Shields ====== | ||
Ligne 8: | Ligne 12: | ||
===== Wiring ===== | ===== Wiring ===== | ||
+ | {{: | ||
+ | \\ | ||
{{: | {{: | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | {{: | ||
+ | ===== Code ===== | ||
+ | <code c> | ||
+ | #include < | ||
+ | |||
+ | static byte mac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 }; | ||
+ | static byte ip[] = { 192, 168, 1, 10 }; | ||
+ | byte Ethernet:: | ||
+ | |||
+ | void setup () { | ||
+ | if (ether.begin(sizeof Ethernet:: | ||
+ | Serial.println(" | ||
+ | if (!ether.staticSetup(ip)) | ||
+ | Serial.println(" | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | ether.packetLoop(ether.packetReceive()); | ||
+ | } | ||
+ | </ |