Step 5: Client

Picture of Client
You can also use the Ethernet Shield as a client. In other words, you can use it to read websites like a web browser.

Websites have a lot of text both visible and hidden, which makes programming on the client side very tricky. Reading information from websites typically involves parsing a lot of strings. This is maddening, but worth it, if that is what you intend to do.

I was going to write some code to read Twitter messages, but such a code already exists as an example within the Arduino programmer. Instead, I simply modified it slightly to turn on an LED if a special message is read.

To make this work connect the positive lead an LED to pin D2, and the negative lead in series with a 220 ohm resistor to ground.

Don't forget to enter your own IP address into the code below, or it will not work.

Here is the code:

Presumably you are going to want to read something other than the recent post on the RandyMcTester Twitter feed.

To read other Twitter feeds, change the following bit of text:
client.println("GET /1/statuses/user_timeline.xml?screen_name=[NEW TWITTER NAME HERE]&count=1 HTTP/1.1");
cool.honny.56 months ago

This Tutorial is Fantastic and very very very very clear everything.Got this tutorial after 4 days searching on my related topic.

Many Many Thanks Dear.

parth_bhat2 years ago
my ethernet shields ic gets hot will u plsplspls help me for that
am using arduino leonardo board
pls help me

randofo (author)  parth_bhat2 years ago
Did you do anything to change it, and/or did you plug it in correctly? It sounds like you are shorting something.

Wow! a whole year later? No, It's something about the 3.3 regulator, that is handling a lot of amperage from the 5100.. I thought I saw somewhere on another instructable, someone solved the problem (slightly) by DOUBLING the regulator. (stacking another one on top of the original, so you had 2 in parallel.) http://www.instructables.com/id/Beef-up-your-Arduino-power/

That happens with my wiznet W5100 too. It just happens I think.
I have one of the Non-POE (power Over Ethernet) 5100's, and it does the same to me.. I think it's the 3.3V regulator trying to run the single chip, which is chewing-up massive wattage.. (even if it is being powered from the +5V regulator from the Arduino.) I've often wondered, if I could repower this off the 3.3V off an external power supply, but someone said that's a bad idea, as the back-feed could burn-out the regulator, and other chips switching between the 9 down to 5, and 5 down to 3.3, or even the USB to serial chip.
rstott21 year ago

This instructable answered questions I couldn't resolve after hours of work! Thanks for taking the time to do it!

Zarainia2 years ago
Is the "serverName" line supposed to be changed?
Never mind, it worked. Thanks for the tutorial!
jstelmack2 years ago
Just getting started with Audrino and Ethernet Shield. Your tutorial has helped TREMENDOUSLY! Thanks For your time/efforts!