Ethernet.begin(). Optionally pull
Prevously I wrote about the madness I had with several Ethernet Modules and Shields.
Through my journey to find the “best” Arduino compatible Ethernet Shield, I found a very nice and promising Arduino Board with a built-in ethernet.
I ordered two boards without PoE. Unfortunately the boards were laying around for a long time, because I couldn’t figure out how to use the ethernet functionality.
I didn’t even bother to try out Arduino IDE. PlatformIO is in my opinion much more advanced and mature. I was about to give up after digging into
pins_arduino.h without any success and trying for hours different libraries and example sourcecodes that I came across online.
Finally I found some hints in a five year old and weird GitHub repository of RobotDyn.4
I uploaded a working UDP Server example to Github. You can assign a static IP address and connect to it via
netcat or other UDP client on port
By pulling the
RST pin 11
Ethernet.begin() function, ethernet worked without any issues.
1 2 3 4 5 6 7 8 //#define CS 4 // SD CS #define SS 10 // W5500 CS #define RST 11 // W5500 RST pinMode(RST, OUTPUT); digitalWrite(RST, HIGH); Ethernet.begin(mac, ip);
Optionally you can pull
SS pin 10
HIGH after the function to select Ethernet. To switch to SD you need to pull
CS pin 4
LOW. Unfortunately I didn’t had much time to test it myself.
Personally I prefer Leonardo Ethernet over Ethernet Shield for Arduino Uno. The ethernet chip of the Leonardo Ethernet
W5500 differs to the Arduino Uno’s (Clone) Ethernet Shields
W5100 and has more functionalities.
Instead of the
ATmega328P microcontroller of the Arduino Uno, Leonardo uses the
ATmega32u4 microchip. A main advantage is to program the Arduino Leonardo (and Micro) as a HID device.
In other words, we can build a Keyboard/Mouse device with Network connectivity for upcoming cool projects.
One of it will be a dual controller for Software Groundstations like MissionPlaner and QGroundControl that takes the inputs of a Joystick or Gamepad to control the vehicle.
With a press of a button we will be able to switch from a HID Joystick to a MAVLink standalone Hardware Groundstation via UDP packets.