Reader small image

You're reading from  Arduino Development Cookbook

Product typeBook
Published inApr 2015
Publisher
ISBN-139781783982943
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Cornel M Amariei
Cornel M Amariei
author image
Cornel M Amariei

Cornel Amariei is a Romanian inventor and entrepreneur in the fields of Robotics and 3D printing. He has been working with the Arduino platform since its early days in 2007. His past experience involves large cargo gamma ray scanning robotics, ATM security systems, and blind assisting devices. In his spare time, he is a performing musician playing multiple instruments—predominately the guitar. He is also a swimmer, water polo player, and photographer. Over the years, he has built hundreds of Arduino projects, ranging from flying Quadcopters to levitating magnets and underwater robots. Currently, he splits his time between doing his undergraduate studies in electric engineering and computer science at Jacobs University in Bremen, Germany, and his start-ups and research and development job.
Read more about Cornel M Amariei

Right arrow

Ethernet


Using an Ethernet shield, we can connect an Arduino to the Internet. All the power and awesomeness of the Internet can come to this small blue board we are programming. This is a huge topic; however, the Arduino Ethernet library makes it all simple.

Here, we will create an interesting application for this functionality. We will make the Arduino a local web server to which we can connect to find out the readings of the first three analog inputs, using our browser.

Getting ready

The following are the ingredients needed for this recipe:

  • An Arduino

  • An Arduino Ethernet shield

  • A router or just an Ethernet cable

How to do it…

Follow these steps to build the server:

  1. Carefully plug the Ethernet shield into the Arduino.

  2. Connect an Ethernet cable to the shield.

  3. Connect the other end of the Ethernet cable to the same router to which your computer is connected.

Code

The following code attempts to connect to a router using DHCP. Once it does, it will output the IP via serial and then it will wait for incoming...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Arduino Development Cookbook
Published in: Apr 2015Publisher: ISBN-13: 9781783982943

Author (1)

author image
Cornel M Amariei

Cornel Amariei is a Romanian inventor and entrepreneur in the fields of Robotics and 3D printing. He has been working with the Arduino platform since its early days in 2007. His past experience involves large cargo gamma ray scanning robotics, ATM security systems, and blind assisting devices. In his spare time, he is a performing musician playing multiple instruments—predominately the guitar. He is also a swimmer, water polo player, and photographer. Over the years, he has built hundreds of Arduino projects, ranging from flying Quadcopters to levitating magnets and underwater robots. Currently, he splits his time between doing his undergraduate studies in electric engineering and computer science at Jacobs University in Bremen, Germany, and his start-ups and research and development job.
Read more about Cornel M Amariei