Tutorial.DhcpAddressPrinter History

Hide minor edits - Show changes to output

November 16, 2011, at 04:32 AM by Scott Fitzgerald -
Changed line 34 from:
(:includeurl http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/DhcpAddressPrinter/DhcpAddressPrinter.ino border=0:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/DhcpAddressPrinter/DhcpAddressPrinter.ino lang=arduino tabwidth=4:)
November 01, 2011, at 05:36 PM by Scott Fitzgerald -
Changed lines 6-7 from:
DHCP is used to assign an IP address when Ethernet.begin(mac) is called. Using DHCP significantly increases the size of a sketch.
to:
DHCP is used to assign an IP address when Ethernet.begin(mac) is called. Using DHCP significantly increases the size of a sketch. Using the localIP() function, the assigned IP address is sent out via the serial monitor.
November 01, 2011, at 05:30 PM by Scott Fitzgerald -
Added lines 1-47:
''Examples > Ethernet Library''

!!!DHCP Address Printer
This sketch uses the DHCP extensions to the Ethernet library to get an IP address via DHCP and print the address obtained using an Arduino Ethernet shield.

DHCP is used to assign an IP address when Ethernet.begin(mac) is called. Using DHCP significantly increases the size of a sketch.

(:div class=BOM :)
'''Hardware Required'''
* Arduino Ethernet Shield
* Shield-compatible Arduino board

(:divend:)

'''Circuit'''
(:div class=circuit :)

The Ethernet shield allows you to connect a WizNet Ethernet controller to the Arduino via the SPI bus. It uses pins 10, 11, 12, and 13 for the SPI connection to the WizNet. Later models of the Ethernet shield also have an SD Card on board. Digital pin 4 is used to control the slave select pin on the SD card.

The shield should be connected to a network with an ethernet cable. You will need to change the network settings in the program to correspond to your network.

%height=300px%[[Attach:ArduinoPlusEthernetShield.png | Attach:ArduinoPlusEthernetShield.png]]

[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]

'''''In the above image, your Arduino would be stacked below the Ethernet shield.'''''

(:divend:)


'''Code'''

(:div class=code :)
(:includeurl http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/DhcpAddressPrinter/DhcpAddressPrinter.ino border=0:)
(:divend:)


'''See Also:'''
* [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]
* [[Guide/ArduinoEthernetShield | Getting started with the ethernet shield]]
* [[Reference/Ethernet | Ethernet library]]
* [[ChatServer]]
* [[WebClient]]
* [[WebServer]]
* [[PachubeCient]]
* [[TwitterClient]]
*[[BarometricPressureWebServer]]

Share