Sunday, August 19, 2018

Ethernet Shield


The ethernet shield by SunFounder is a very fast way to add hardline ethernet functionality to the arduino board.  The sketches are also fairly straight forward with a few gotchas to consider.



Wiring

  • For initial testing, do not place a micro SD card in the slot
  • Digital pins 10, 11, 12 and 13 are used by the shield, so you cannot use them

Code

Note that the Ethernet.h code limits the UDP payload to 24 chars.  For larger messages you'll need to increase the max packet size in the header.
  • Run the Examples > Ethernet > DhcpAddressPrinter to get the assigned address of your board.
  • Examples > Ethernet > UDPSendReceiveString is a good test for bidirectional communication testing
    • I used a simple C# program to perform initial comms
  • Examples > Ethernet > WebServer is a good example for showing how to write a web UI for your arduino.

No comments:

Post a Comment