The Adafruit Ethernet FeatherWing is an expansion board that grants Ethernet networking capabilities to Feather-compatible microcontroller boards. It integrates a WIZnet W5500 Ethernet controller, which is a reliable and efficient chip for networked communication. The board also includes an RJ45 Ethernet connector and a MicroSD card slot, which can be used for logging data or serving files over the network. This makes the Ethernet FeatherWing an excellent choice for Internet of Things (IoT) projects, home automation, and any application where wired network connectivity is preferable to wireless.
Pin | Description |
---|---|
MOSI | Master Out Slave In - SPI data input to the W5500 |
MISO | Master In Slave Out - SPI data output from the W5500 |
SCK | Serial Clock - SPI clock signal |
CS | Chip Select - Active low, selects the W5500 for SPI communication |
RST | Reset - Active low, resets the W5500 |
INT | Interrupt - Indicates the presence of an interrupt from the W5500 |
GND | Ground - Common ground for power and logic |
3V3 | 3.3V Power - Power supply for the W5500 and logic levels |
VIN | Voltage Input - Unregulated input for onboard voltage regulator |
Can I use the Ethernet FeatherWing with any Feather board? Yes, it is designed to be compatible with all Feather boards that support SPI communication.
Do I need to install any drivers for the W5500 chip? No drivers are needed, but you will need to include the Ethernet2 library in your Arduino sketches.
Can I access the MicroSD card over the network? Yes, with the appropriate code, you can serve files from the MicroSD card over the network.
#include <SPI.h>
#include <Ethernet2.h>
// MAC address for your Ethernet shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// IP address for the shield (optional)
IPAddress ip(192, 168, 1, 177);
// Initialize the Ethernet client library
EthernetClient client;
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
Serial.println("Initialize Ethernet with DHCP:");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// Try to configure using IP address instead of DHCP
Ethernet.begin(mac, ip);
}
// Give the Ethernet shield a second to initialize
delay(1000);
Serial.println("Ethernet initialized");
}
void loop() {
// Your code to handle networking tasks goes here
}
Remember to adjust the mac
and ip
variables to match your network configuration. The above code initializes the Ethernet connection using DHCP, but falls back to a static IP if DHCP fails.