{{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_standard_version-1000x1000.jpg?200|}} {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_arduino_shield.jpg?200|}} {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_arduino_nano_shield.jpg?200|}} ====== ENC28J60 based Cards / Modules / Shields ====== ===== Libraries ===== * [[https://github.com/UIPEthernet/UIPEthernet|UIPEthernet]] great for projects that require "print" to be fully implemented and need to be a drop-in replacement for the standard "Ethernet" library * [[https://github.com/muanis/arduino-projects/tree/master/libraries/ETHER_28J60|ETHER_28j60]] is great for its simplicity and small size, but comes with limitations * [[https://github.com/njh/EtherCard|Ethercard]] best for very advanced users ===== Wiring ===== {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_arduino_uno_due_mega_wiring_03.jpg?400|}} \\ {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60-arduino-wiring-300x201.png|}} \\ {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_arduino_uno_due_mega_wiring_01.jpg|}} \\ {{:documentation:microcontroleurs:arduino:modules:network_shields:enc28j60:enc28j60_arduino_uno_due_mega_wiring_02.jpg|}} ===== Code ===== #include static byte mac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 }; static byte ip[] = { 192, 168, 1, 10 }; byte Ethernet::buffer[500]; void setup () { if (ether.begin(sizeof Ethernet::buffer, mac, 8) == 0) Serial.println("Failed to access Ethernet controller"); if (!ether.staticSetup(ip)) Serial.println("Failed to set IP address"); } void loop() { ether.packetLoop(ether.packetReceive()); }