Instructables

Arduino Ethernet Shield Tutorial

Featured

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");
 
Remove these adsRemove these ads by Signing Up
parth_bhat11 months ago
my ethernet shields ic gets hot will u plsplspls help me for that
am using arduino leonardo board
pls help me

regards
pyt
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.
randofo (author)  parth_bhat11 months ago
Did you do anything to change it, and/or did you plug it in correctly? It sounds like you are shorting something.
Zarainia1 year ago
Is the "serverName" line supposed to be changed?
Never mind, it worked. Thanks for the tutorial!
jstelmack1 year ago
Just getting started with Audrino and Ethernet Shield. Your tutorial has helped TREMENDOUSLY! Thanks For your time/efforts!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!